Use the find_dependency option to parse Simgear dependencies to FlightGear
This commit is contained in:
parent
023364e245
commit
c0205f7eb2
@ -211,11 +211,10 @@ else()
|
||||
endif(ENABLE_RTI)
|
||||
|
||||
if(ENABLE_CYCLONE)
|
||||
if (NOT TARGET CycloneDDS::ddsc)
|
||||
find_package(CycloneDDS QUIET)
|
||||
endif()
|
||||
find_package(CycloneDDS QUIET)
|
||||
if (CycloneDDS_FOUND)
|
||||
message(STATUS "Data Distribution Service support: CycloneDDS")
|
||||
set(SG_HAVE_DDS 1)
|
||||
else(CycloneDDS_FOUND)
|
||||
message(STATUS "Data Distribution Service support: DISBLED")
|
||||
endif(CycloneDDS_FOUND)
|
||||
|
@ -17,6 +17,12 @@ set(SIMGEAR_SHARED @SIMGEAR_SHARED@)
|
||||
|
||||
set(ENABLE_SIMD @ENABLE_SIMD@)
|
||||
|
||||
# SycloneDDS support
|
||||
set(SG_HAVE_DDS @SG_HAVE_DDS@)
|
||||
if(SG_HAVE_DDS)
|
||||
find_dependency(CycloneDDS)
|
||||
endif()
|
||||
|
||||
# OpenRTI support
|
||||
set(ENABLE_RTI @ENABLE_RTI@)
|
||||
if(ENABLE_RTI)
|
||||
|
@ -131,6 +131,10 @@ install(TARGETS SimGearCore
|
||||
# we expose ZLib in some of our headers
|
||||
target_link_libraries(SimGearCore PUBLIC ZLIB::ZLIB)
|
||||
|
||||
if (SG_HAVE_DDS)
|
||||
target_link_libraries(SimGearCore PRIVATE CycloneDDS::ddsc)
|
||||
endif()
|
||||
|
||||
if (ENABLE_RTI)
|
||||
target_sources(SimGearCore PRIVATE $<TARGET_OBJECTS:rti> $<TARGET_OBJECTS:rti13>)
|
||||
target_link_libraries(SimGearCore PRIVATE PkgConfig::RTI)
|
||||
|
Loading…
Reference in New Issue
Block a user