X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmath%2FCMakeLists.txt;h=f66ec15a8ee78cf3ff8a8bf38911a4c9062d5c2e;hb=66c9187c95fb6861d9737f135fdf68d1bfa265f3;hp=13d3a08f683934bd3ab2e795a9fd74ec26389a3f;hpb=d53e2fa8c12cd12e9d34e20ea9331257fb4fd35e;p=simgear.git diff --git a/simgear/math/CMakeLists.txt b/simgear/math/CMakeLists.txt index 13d3a08f..f66ec15a 100644 --- a/simgear/math/CMakeLists.txt +++ b/simgear/math/CMakeLists.txt @@ -2,7 +2,6 @@ include (SimGearComponent) set(HEADERS - Math.hxx SGBox.hxx SGCMath.hxx SGGeoc.hxx @@ -28,27 +27,34 @@ set(HEADERS beziercurve.hxx interpolater.hxx leastsqs.hxx - project.hxx sg_geodesy.hxx sg_types.hxx - sg_random.h + sg_random.h ) set(SOURCES - SGGeod.cxx SGGeodesy.cxx interpolater.cxx leastsqs.cxx - project.cxx - sg_random.c + sg_random.c ) simgear_component(math math "${SOURCES}" "${HEADERS}") +if(ENABLE_TESTS) + +if (SIMGEAR_SHARED) + set(TEST_LIBS SimGearCore) +else() + set(TEST_LIBS sgmath sgstructure sgdebug) +endif() + + add_executable(math_test SGMathTest.cxx) -target_link_libraries(math_test sgmath sgstructure sgdebug) +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 sgmath sgstructure sgdebug) +add_executable(geometry_test SGGeometryTest.cxx) +target_link_libraries(geometry_test ${TEST_LIBS}) add_test(geometry ${EXECUTABLE_OUTPUT_PATH}/geometry_test) +endif(ENABLE_TESTS)