From: James Turner Date: Thu, 7 Feb 2013 17:42:00 +0000 (+0000) Subject: Fix math test linkage. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9cac2c1457d4ea6e507a31719a7ff2b1f8941f7c;p=simgear.git Fix math test linkage. --- diff --git a/simgear/math/CMakeLists.txt b/simgear/math/CMakeLists.txt index 0ebe7fd0..436b8f41 100644 --- a/simgear/math/CMakeLists.txt +++ b/simgear/math/CMakeLists.txt @@ -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)