-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)