29 lines
691 B
CMake
29 lines
691 B
CMake
|
|
cmake_minimum_required(VERSION 3.15)
|
||
|
|
|
||
|
|
project(XCEngine_ComponentsTests)
|
||
|
|
|
||
|
|
set(COMPONENTS_TEST_SOURCES
|
||
|
|
test_component.cpp
|
||
|
|
test_transform_component.cpp
|
||
|
|
test_game_object.cpp
|
||
|
|
)
|
||
|
|
|
||
|
|
add_executable(xcengine_components_tests ${COMPONENTS_TEST_SOURCES})
|
||
|
|
|
||
|
|
if(MSVC)
|
||
|
|
set_target_properties(xcengine_components_tests PROPERTIES
|
||
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
||
|
|
)
|
||
|
|
endif()
|
||
|
|
|
||
|
|
target_link_libraries(xcengine_components_tests PRIVATE
|
||
|
|
XCEngine
|
||
|
|
GTest::gtest
|
||
|
|
GTest::gtest_main
|
||
|
|
)
|
||
|
|
|
||
|
|
target_include_directories(xcengine_components_tests PRIVATE
|
||
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
||
|
|
)
|
||
|
|
|
||
|
|
add_test(NAME ComponentTests COMMAND xcengine_components_tests)
|