2018-03-25 12:18:24 +00:00
|
|
|
function(setup_fgfs_libraries target)
|
|
|
|
link_directories ( ${Boost_LIBRARY_DIRS} )
|
|
|
|
|
|
|
|
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
|
|
|
#message(STATUS "fg libs ${FG_LIBS}")
|
|
|
|
#message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}")
|
|
|
|
#message(STATUS "SG libs ${SIMGEAR_LIBRARIES}")
|
|
|
|
|
|
|
|
if(RTI_FOUND)
|
2020-03-15 22:31:05 +00:00
|
|
|
set(HLA_LIBRARIES ${RTI_LDFLAGS})
|
2018-03-25 12:18:24 +00:00
|
|
|
else()
|
|
|
|
set(HLA_LIBRARIES "")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(GDAL_FOUND)
|
|
|
|
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
|
|
|
|
else()
|
|
|
|
set(GDAL_LIBRARIES "")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_JSBSIM)
|
|
|
|
target_link_libraries(${target} JSBSim)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_IAX)
|
|
|
|
target_link_libraries(${target} iaxclient_lib ${OPENAL_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2019-05-27 10:37:35 +00:00
|
|
|
# manually created DBus target
|
|
|
|
if(TARGET DBus)
|
|
|
|
target_link_libraries(${target} DBus)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# PkgCOnfig::DBUS target
|
|
|
|
if(TARGET PkgConfig::DBUS)
|
|
|
|
target_link_libraries(${target} PkgConfig::DBUS)
|
2018-03-25 12:18:24 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(FG_HAVE_GPERFTOOLS)
|
|
|
|
target_link_libraries(${target} ${GooglePerfTools_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(X11_FOUND)
|
|
|
|
target_link_libraries(${target} ${X11_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
target_link_libraries(${target}
|
|
|
|
SimGearCore
|
|
|
|
SimGearScene
|
|
|
|
${EVENT_INPUT_LIBRARIES}
|
|
|
|
${GDAL_LIBRARIES}
|
|
|
|
${HLA_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${OPENSCENEGRAPH_LIBRARIES}
|
|
|
|
${PLATFORM_LIBS}
|
|
|
|
${PLIB_LIBRARIES}
|
|
|
|
${SQLITE3_LIBRARY}
|
|
|
|
${SIMGEAR_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2016-01-13 04:44:28 +00:00
|
|
|
if (ENABLE_PLIB_JOYSTICK)
|
|
|
|
target_link_libraries(${target} PLIBJoystick)
|
|
|
|
endif()
|
2018-03-25 12:18:24 +00:00
|
|
|
|
2020-03-13 11:27:11 +00:00
|
|
|
target_link_libraries(${target} PLIBFont)
|
|
|
|
|
2019-06-03 15:51:08 +00:00
|
|
|
if(SYSTEM_HTS_ENGINE)
|
|
|
|
target_link_libraries(${target} flite_hts ${HTS_ENGINE_LIBRARIES})
|
|
|
|
else()
|
|
|
|
target_link_libraries(${target} flite_hts hts_engine)
|
2018-03-25 12:18:24 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Qt5Core_FOUND)
|
|
|
|
target_link_libraries(${target} Qt5::Core Qt5::Widgets fglauncher fgqmlui)
|
|
|
|
set_property(TARGET ${target} PROPERTY AUTOMOC ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_AEONWAVE)
|
|
|
|
target_link_libraries(${target} ${AAX_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|
|
|
target_link_libraries(${target} execinfo)
|
|
|
|
endif()
|
2019-08-12 16:52:53 +00:00
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
|
|
target_link_libraries(${target} execinfo)
|
|
|
|
endif()
|
2018-03-25 12:18:24 +00:00
|
|
|
endfunction()
|