From: James Turner Date: Thu, 7 Feb 2013 17:51:42 +0000 (+0000) Subject: Fix property tests static linkage. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cf4af2692b0b29b101bc64560926c6f851ead5f6;p=simgear.git Fix property tests static linkage. --- diff --git a/simgear/props/CMakeLists.txt b/simgear/props/CMakeLists.txt index 7a888d28..f6f3677c 100644 --- a/simgear/props/CMakeLists.txt +++ b/simgear/props/CMakeLists.txt @@ -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) diff --git a/simgear/props/propertyObject_test.cxx b/simgear/props/propertyObject_test.cxx index 9c354f46..d0d59472 100644 --- a/simgear/props/propertyObject_test.cxx +++ b/simgear/props/propertyObject_test.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include "propertyObject.hxx"