Files
XCEngine/tests/UI/Editor/unit/CMakeLists.txt

240 lines
9.5 KiB
CMake

set(EDITOR_UI_UNIT_TEST_SOURCES
test_ui_editor_command_dispatcher.cpp
test_ui_editor_command_registry.cpp
test_ui_editor_dock_host_interaction.cpp
test_ui_editor_menu_model.cpp
test_ui_editor_menu_session.cpp
test_ui_editor_menu_bar.cpp
test_ui_editor_menu_popup.cpp
test_ui_editor_panel_content_host.cpp
test_ui_editor_panel_host_lifecycle.cpp
test_ui_editor_panel_input_filter.cpp
test_ui_editor_property_grid.cpp
test_ui_editor_property_grid_interaction.cpp
test_ui_editor_shell_compose.cpp
test_ui_editor_shell_interaction.cpp
test_ui_editor_collection_primitives.cpp
test_ui_editor_drag_drop.cpp
test_ui_editor_field_row_layout.cpp
test_ui_editor_hosted_field_builders.cpp
test_ui_editor_bool_field.cpp
test_ui_editor_bool_field_interaction.cpp
test_ui_editor_color_field.cpp
test_ui_editor_color_field_interaction.cpp
test_ui_editor_asset_field.cpp
test_ui_editor_asset_field_interaction.cpp
test_ui_editor_dock_host.cpp
test_ui_editor_inline_rename_session.cpp
test_ui_editor_list_view.cpp
test_ui_editor_list_view_interaction.cpp
test_ui_editor_panel_frame.cpp
test_ui_editor_enum_field.cpp
test_ui_editor_enum_field_interaction.cpp
test_ui_editor_number_field.cpp
test_ui_editor_number_field_interaction.cpp
test_ui_editor_object_field.cpp
test_ui_editor_object_field_interaction.cpp
test_ui_editor_text_field.cpp
test_ui_editor_text_field_interaction.cpp
test_ui_editor_vector2_field.cpp
test_ui_editor_vector2_field_interaction.cpp
test_ui_editor_vector3_field.cpp
test_ui_editor_vector3_field_interaction.cpp
test_ui_editor_vector4_field.cpp
test_ui_editor_vector4_field_interaction.cpp
test_ui_editor_scroll_view.cpp
test_ui_editor_scroll_view_interaction.cpp
test_ui_editor_status_bar.cpp
test_ui_editor_tab_strip.cpp
test_ui_editor_tab_strip_interaction.cpp
test_ui_editor_tree_panel_behavior.cpp
test_ui_editor_tree_view.cpp
test_ui_editor_tree_view_interaction.cpp
test_ui_editor_viewport_input_bridge.cpp
test_ui_editor_viewport_shell.cpp
test_ui_editor_viewport_slot.cpp
test_ui_editor_workspace_compose.cpp
test_ui_editor_workspace_interaction.cpp
test_ui_editor_shortcut_manager.cpp
test_ui_editor_workspace_controller.cpp
test_ui_editor_workspace_layout_persistence.cpp
test_ui_editor_workspace_model.cpp
test_ui_editor_workspace_splitter_drag_correction.cpp
test_ui_editor_workspace_session.cpp
test_ui_editor_window_workspace_controller.cpp
)
set(EDITOR_APP_CORE_TEST_SOURCES
test_editor_host_command_bridge.cpp
test_editor_project_runtime.cpp
test_editor_shell_asset_validation.cpp
test_project_browser_model.cpp
test_hierarchy_scene_binding.cpp
test_inspector_presentation.cpp
)
set(EDITOR_APP_FEATURE_TEST_SOURCES
test_editor_window_input_routing.cpp
test_project_panel.cpp
test_scene_viewport_render_plan.cpp
test_scene_viewport_runtime.cpp
test_viewport_object_id_picker.cpp
)
add_executable(editor_ui_tests ${EDITOR_UI_UNIT_TEST_SOURCES})
target_link_libraries(editor_ui_tests
PRIVATE
XCUIEditor
GTest::gtest_main
)
target_include_directories(editor_ui_tests
PRIVATE
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include
${CMAKE_SOURCE_DIR}/engine/include
)
if(MSVC)
target_compile_options(editor_ui_tests PRIVATE /utf-8 /FS)
set_target_properties(editor_ui_tests PROPERTIES
MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
COMPILE_PDB_NAME "editor_ui_tests-compile"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb"
COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug"
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
)
set_property(TARGET editor_ui_tests PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
include(GoogleTest)
gtest_discover_tests(editor_ui_tests
DISCOVERY_MODE POST_BUILD
)
if(TARGET XCEditorCore)
add_executable(editor_app_core_tests
${EDITOR_APP_CORE_TEST_SOURCES}
)
target_link_libraries(editor_app_core_tests
PRIVATE
XCEditorCore
GTest::gtest_main
)
target_include_directories(editor_app_core_tests
PRIVATE
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Composition
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Core
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Features
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Host/Interfaces
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Scene
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Services
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Support
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include
${CMAKE_SOURCE_DIR}/engine/include
)
if(MSVC)
target_compile_options(editor_app_core_tests PRIVATE /utf-8 /FS)
set_target_properties(editor_app_core_tests PROPERTIES
MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
COMPILE_PDB_NAME "editor_app_core_tests-compile"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb"
COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug"
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
)
set_property(TARGET editor_app_core_tests PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
gtest_discover_tests(editor_app_core_tests
DISCOVERY_MODE POST_BUILD
)
add_executable(editor_app_feature_tests
${EDITOR_APP_FEATURE_TEST_SOURCES}
)
target_link_libraries(editor_app_feature_tests
PRIVATE
XCEditorCore
GTest::gtest_main
)
target_include_directories(editor_app_feature_tests
PRIVATE
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Composition
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Core
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Features
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Host/Interfaces
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Rendering
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Scene
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Services
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/app/Support
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include
${CMAKE_SOURCE_DIR}/engine/include
)
if(MSVC)
target_compile_options(editor_app_feature_tests PRIVATE /utf-8 /FS)
set_target_properties(editor_app_feature_tests PROPERTIES
MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
COMPILE_PDB_NAME "editor_app_feature_tests-compile"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb"
COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug"
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
)
set_property(TARGET editor_app_feature_tests PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
gtest_discover_tests(editor_app_feature_tests
DISCOVERY_MODE POST_BUILD
)
endif()
add_executable(editor_windowing_phase1_tests
test_editor_window_tab_drag_drop_target.cpp
test_editor_window_synchronization_planner.cpp
)
target_link_libraries(editor_windowing_phase1_tests
PRIVATE
XCUIEditor
GTest::gtest_main
)
target_include_directories(editor_windowing_phase1_tests
PRIVATE
${CMAKE_SOURCE_DIR}/editor/include
${CMAKE_SOURCE_DIR}/engine/include
)
if(MSVC)
target_compile_options(editor_windowing_phase1_tests PRIVATE /utf-8 /FS)
set_target_properties(editor_windowing_phase1_tests PROPERTIES
MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>"
COMPILE_PDB_NAME "editor_windowing_phase1_tests-compile"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb"
COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug"
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
)
set_property(TARGET editor_windowing_phase1_tests PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
gtest_discover_tests(editor_windowing_phase1_tests
DISCOVERY_MODE POST_BUILD
)