Refactor CMake configuration for ImGuiTestEngine and feature flags
- Updated the CMake configuration to use target_compile_definitions for ImGuiTestEngine, improving clarity and maintainability. - Introduced IMGUI_TEST_ENGINE_DEFINITIONS to streamline the definition process for targets linking to ImGuiTestEngine. - Modified feature flags in features.h to conditionally enable the native file dialog based on the YAZE_ENABLE_NFD flag, enhancing flexibility in feature management.
This commit is contained in:
@@ -94,7 +94,9 @@ if(YAZE_ENABLE_UI_TESTS)
|
||||
if(TARGET ImGuiTestEngine)
|
||||
target_include_directories(yaze PUBLIC ${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine)
|
||||
target_link_libraries(yaze PUBLIC ImGuiTestEngine)
|
||||
target_compile_definitions(yaze PRIVATE YAZE_ENABLE_IMGUI_TEST_ENGINE=1)
|
||||
target_compile_definitions(yaze PRIVATE
|
||||
YAZE_ENABLE_IMGUI_TEST_ENGINE=1
|
||||
${IMGUI_TEST_ENGINE_DEFINITIONS})
|
||||
else()
|
||||
target_compile_definitions(yaze PRIVATE YAZE_ENABLE_IMGUI_TEST_ENGINE=0)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user