]> git.mxchange.org Git - simgear.git/commitdiff
Fix property tests static linkage.
authorJames Turner <zakalawe@mac.com>
Thu, 7 Feb 2013 17:51:42 +0000 (17:51 +0000)
committerJames Turner <zakalawe@mac.com>
Thu, 7 Feb 2013 17:51:42 +0000 (17:51 +0000)
simgear/props/CMakeLists.txt
simgear/props/propertyObject_test.cxx

index 7a888d282ad482707039e702f4a0176228ebf82c..f6f3677c424253e9236f092cd522cbc5f18fb360 100644 (file)
@@ -28,11 +28,18 @@ set(SOURCES
 simgear_component(props props "${SOURCES}" "${HEADERS}")
 
 if(ENABLE_TESTS)
+
+if (SIMGEAR_SHARED)
+    set(TEST_LIBS SimGearCore)
+else()
+    set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
 add_executable(test_props props_test.cxx)
-target_link_libraries(test_props SimGearCore)
+target_link_libraries(test_props ${TEST_LIBS})
 add_test(test_props ${EXECUTABLE_OUTPUT_PATH}/test_props)
 
 add_executable(test_propertyObject propertyObject_test.cxx)
-target_link_libraries(test_propertyObject SimGearCore)
+target_link_libraries(test_propertyObject ${TEST_LIBS})
 add_test(test_propertyObject ${EXECUTABLE_OUTPUT_PATH}/test_propertyObject)
 endif(ENABLE_TESTS)
index 9c354f465b37b386647de198064e6578667fbfbc..d0d5947227848d46e99882faabc9be00591889aa 100644 (file)
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <cstdlib>
 #include <cstring>
+#include <cstdio>
 
 #include "propertyObject.hxx"