2026-04-05 20:46:24 +08:00
|
|
|
set(NEW_EDITOR_TEST_SOURCES
|
|
|
|
|
test_sandbox_frame_builder.cpp
|
|
|
|
|
test_structured_editor_shell.cpp
|
2026-04-05 16:11:08 +08:00
|
|
|
)
|
2026-04-05 07:29:27 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
add_executable(new_editor_tests ${NEW_EDITOR_TEST_SOURCES})
|
2026-04-05 07:29:27 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
target_link_libraries(new_editor_tests PRIVATE
|
|
|
|
|
XCNewEditorLib
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
)
|
2026-04-05 12:50:55 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
target_include_directories(new_editor_tests PRIVATE
|
|
|
|
|
${CMAKE_SOURCE_DIR}/new_editor/src
|
|
|
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
|
|
|
)
|
2026-04-05 12:50:55 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" XCNEWEDITOR_REPO_ROOT_PATH)
|
2026-04-05 12:50:55 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
target_compile_definitions(new_editor_tests PRIVATE
|
|
|
|
|
XCNEWEDITOR_REPO_ROOT="${XCNEWEDITOR_REPO_ROOT_PATH}"
|
|
|
|
|
)
|
2026-04-05 12:50:55 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
if(MSVC)
|
|
|
|
|
target_compile_options(new_editor_tests PRIVATE /utf-8 /FS)
|
|
|
|
|
set_property(TARGET new_editor_tests PROPERTY
|
|
|
|
|
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
2026-04-05 12:50:55 +08:00
|
|
|
endif()
|
2026-04-05 14:05:46 +08:00
|
|
|
|
2026-04-05 20:46:24 +08:00
|
|
|
add_test(NAME new_editor_tests COMMAND new_editor_tests)
|