Tests: Move pthread dependency to gtest

The test binaries don't directly use pthread (but gtest does), so the
dependency should be added to gtest instead of the binary itself.
shapetextures
Nicolas Hake 2015-12-13 14:33:02 +01:00
parent b6327fdf93
commit 7d186516a8
1 changed files with 3 additions and 3 deletions

View File

@ -77,6 +77,9 @@ if (GTEST_SOURCE_ALL AND GTEST_INCLUDE_DIR)
)
if (GTEST_ROOT)
include_directories("${GTEST_ROOT}")
endif()
if(HAVE_PTHREAD)
target_link_libraries(gtest pthread)
endif()
include_directories("${GTEST_INCLUDE_DIR}")
set(GTEST_FOUND 1)
@ -101,9 +104,6 @@ if (GTEST_FOUND AND GMOCK_FOUND)
if(UNIX AND NOT APPLE)
target_link_libraries(tests rt)
endif()
if(HAVE_PTHREAD)
target_link_libraries(tests pthread)
endif()
if(WIN32)
target_link_libraries(tests winmm)
endif()