Always create only two SimGear libraries: SimGearCore and SimGearStatic, regardless of whether we're building static or shared. This requires an updated to FindSimGear.cmake module, for the static configuration.
24 lines
560 B
CMake
24 lines
560 B
CMake
|
|
include (SimGearComponent)
|
|
|
|
set(HEADERS metar.hxx precipitation.hxx)
|
|
set(SOURCES metar.cxx precipitation.cxx)
|
|
|
|
simgear_scene_component(environment environment "${SOURCES}" "${HEADERS}")
|
|
|
|
if(ENABLE_TESTS)
|
|
add_executable(test_metar test_metar.cxx)
|
|
|
|
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)
|