Refactor new editor scene runtime ownership
This commit is contained in:
@@ -68,11 +68,6 @@ set(EDITOR_UI_UNIT_TEST_SOURCES
|
||||
|
||||
add_executable(editor_ui_tests ${EDITOR_UI_UNIT_TEST_SOURCES})
|
||||
|
||||
target_sources(editor_ui_tests
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/new_editor/app/Composition/EditorHostCommandBridge.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(editor_ui_tests
|
||||
PRIVATE
|
||||
XCUIEditorLib
|
||||
@@ -105,3 +100,52 @@ include(GoogleTest)
|
||||
gtest_discover_tests(editor_ui_tests
|
||||
DISCOVERY_MODE PRE_TEST
|
||||
)
|
||||
|
||||
if(TARGET XCUIEditorAppLib)
|
||||
add_executable(editor_app_feature_tests
|
||||
test_project_browser_model.cpp
|
||||
test_hierarchy_scene_binding.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(editor_app_feature_tests
|
||||
PRIVATE
|
||||
XCUIEditorAppLib
|
||||
XCUIEditorLib
|
||||
XCUIEditorHost
|
||||
GTest::gtest_main
|
||||
)
|
||||
|
||||
target_include_directories(editor_app_feature_tests
|
||||
PRIVATE
|
||||
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include
|
||||
${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}
|
||||
${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()
|
||||
|
||||
if(WIN32 AND EXISTS "${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll")
|
||||
add_custom_command(TARGET editor_app_feature_tests POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll
|
||||
$<TARGET_FILE_DIR:editor_app_feature_tests>/assimp-vc143-mt.dll
|
||||
)
|
||||
endif()
|
||||
|
||||
gtest_discover_tests(editor_app_feature_tests
|
||||
DISCOVERY_MODE PRE_TEST
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user