37 lines
894 B
CMake
37 lines
894 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(XCEngine_EditorTests)
|
|
|
|
set(EDITOR_TEST_SOURCES
|
|
test_action_routing.cpp
|
|
${CMAKE_SOURCE_DIR}/editor/src/Core/UndoManager.cpp
|
|
${CMAKE_SOURCE_DIR}/editor/src/Managers/SceneManager.cpp
|
|
${CMAKE_SOURCE_DIR}/editor/src/Managers/ProjectManager.cpp
|
|
)
|
|
|
|
add_executable(editor_tests ${EDITOR_TEST_SOURCES})
|
|
|
|
if(MSVC)
|
|
set_target_properties(editor_tests PROPERTIES
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(editor_tests PRIVATE
|
|
XCEngine
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
user32
|
|
comdlg32
|
|
)
|
|
|
|
target_include_directories(editor_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
${CMAKE_SOURCE_DIR}/editor/src
|
|
${CMAKE_BINARY_DIR}/_deps/imgui-src
|
|
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
|
|
)
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(editor_tests)
|