16 lines
907 B
CMake
16 lines
907 B
CMake
if(FASET_DEBUG_IMGUI AND TARGET faset_imgui AND TARGET faset_render)
|
|
add_library(faset_debug_overlay STATIC ${PROJECT_SOURCE_DIR}/src/editor/debug_overlay.cpp)
|
|
target_include_directories(faset_debug_overlay PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
|
target_link_libraries(faset_debug_overlay PUBLIC faset_render PRIVATE faset_imgui)
|
|
if(TARGET faset_editor AND TARGET faset_editor_ui)
|
|
target_link_libraries(faset_editor PRIVATE faset_debug_overlay)
|
|
target_compile_definitions(faset_editor PRIVATE FASET_HAS_DEBUG_OVERLAY=1)
|
|
endif()
|
|
if(BUILD_TESTING)
|
|
add_executable(faset_debug_overlay_tests ${PROJECT_SOURCE_DIR}/tests/editor_debug_overlay.cpp)
|
|
target_link_libraries(faset_debug_overlay_tests PRIVATE faset_debug_overlay)
|
|
add_test(NAME editor_debug_overlay COMMAND faset_debug_overlay_tests)
|
|
set_tests_properties(editor_debug_overlay PROPERTIES LABELS "gpu")
|
|
endif()
|
|
endif()
|