]> git.mxchange.org Git - simgear.git/commitdiff
Fix math test linkage.
authorJames Turner <zakalawe@mac.com>
Thu, 7 Feb 2013 17:42:00 +0000 (17:42 +0000)
committerJames Turner <zakalawe@mac.com>
Thu, 7 Feb 2013 17:42:00 +0000 (17:42 +0000)
simgear/math/CMakeLists.txt

index 0ebe7fd0dcc60cf4974d65b679e43900428a6e61..436b8f41e38368fc45a2561a7ac8ada6238ff4e3 100644 (file)
@@ -44,11 +44,18 @@ set(SOURCES
 simgear_component(math math "${SOURCES}" "${HEADERS}")
 
 if(ENABLE_TESTS)
+
+if (SIMGEAR_SHARED)
+    set(TEST_LIBS SimGearCore)
+else()
+    set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
 add_executable(math_test SGMathTest.cxx)
-target_link_libraries(math_test SimGearCore)
+target_link_libraries(math_test ${TEST_LIBS})
 add_test(math ${EXECUTABLE_OUTPUT_PATH}/math_test)
 
 add_executable(geometry_test SGGeometryTest.cxx)
-target_link_libraries(geometry_test SimGearCore)
+target_link_libraries(geometry_test ${TEST_LIBS})
 add_test(geometry ${EXECUTABLE_OUTPUT_PATH}/geometry_test)
 endif(ENABLE_TESTS)