X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fenvironment%2FCMakeLists.txt;h=d5255b041b8cfcbdebcf537aa6f294ba4ac1a146;hb=d4310a7f3b27b8403ba1ec030cfd3b4c6c565f24;hp=c59f98a7575f6673d3936fb865d163ac769db712;hpb=63a8209a839fcc142ab86ef16f323bb54c37521a;p=simgear.git diff --git a/simgear/environment/CMakeLists.txt b/simgear/environment/CMakeLists.txt index c59f98a7..d5255b04 100644 --- a/simgear/environment/CMakeLists.txt +++ b/simgear/environment/CMakeLists.txt @@ -4,13 +4,20 @@ include (SimGearComponent) set(HEADERS metar.hxx precipitation.hxx) set(SOURCES metar.cxx precipitation.cxx) -simgear_component(environment environment "${SOURCES}" "${HEADERS}") +simgear_scene_component(environment environment "${SOURCES}" "${HEADERS}") +if(ENABLE_TESTS) add_executable(test_metar test_metar.cxx) -target_link_libraries(test_metar - sgenvironment sgstructure sgmisc sgdebug - ${CMAKE_THREAD_LIBS_INIT} - ${ZLIB_LIBRARY} - ${RT_LIBRARY}) - -add_test(metar ${EXECUTABLE_OUTPUT_PATH}/test_metar) \ No newline at end of file + +if (SIMGEAR_SHARED) + target_link_libraries(test_metar SimGearScene) +else() + target_link_libraries(test_metar + SimGearScene SimGearCore + ${CMAKE_THREAD_LIBS_INIT} + ${ZLIB_LIBRARY} + ${RT_LIBRARY}) +endif() + +add_test(metar ${EXECUTABLE_OUTPUT_PATH}/test_metar) +endif(ENABLE_TESTS)