2012-08-19 22:23:46 +03:00
|
|
|
find_package(GTest REQUIRED)
|
|
|
|
|
2015-01-09 20:48:36 +01:00
|
|
|
if (GTEST_FOUND)
|
2012-08-19 22:23:46 +03:00
|
|
|
include_directories(${GTEST_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
file(GLOB UNITTEST_SRC_FILES
|
2013-08-30 21:51:23 +02:00
|
|
|
components/misc/test_*.cpp
|
2015-01-09 20:52:31 +01:00
|
|
|
mwdialogue/test_*.cpp
|
2012-08-19 22:23:46 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(apps\\openmw_test_suite FILES openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
|
|
|
|
|
|
|
add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
|
|
|
|
2015-01-09 20:48:36 +01:00
|
|
|
target_link_libraries(openmw_test_suite ${GTEST_BOTH_LIBRARIES} components)
|
2012-08-20 00:18:40 +03:00
|
|
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
endif()
|
2012-08-19 22:23:46 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|