28 lines
848 B
CMake
28 lines
848 B
CMake
set(CMAKE_CXX_STANDARD 20)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
googletest
|
|
URL https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip
|
|
DOWNLOAD_EXTRACT_TIMESTAMP true
|
|
)
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
FetchContent_MakeAvailable(googletest)
|
|
|
|
enable_testing()
|
|
|
|
file(GLOB SRC
|
|
"ObjectFactory.cpp" "WorldFactory.cpp" "TestRenderEngine.cpp" "TestRenderEngine.h" "TestGameInstance.cpp" "TestGameInstance.h"
|
|
"SaveMap/SaveMapTest.cpp" "SaveMap/CustomObject.h"
|
|
"World/WorldTest.cpp" "World/TestWorld.h" "World/TestActor.cpp" "World/TestActor.h"
|
|
)
|
|
|
|
add_executable(Tests ${SRC})
|
|
target_link_libraries(Tests PRIVATE GTest::gtest_main Core RenderEngineSDK)
|
|
target_include_directories(Tests PRIVATE
|
|
${PROJECT_SOURCE_DIR}/Core
|
|
${PROJECT_SOURCE_DIR}/RenderEngineSDK
|
|
)
|
|
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(Tests) |