1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-07 07:50:32 +00:00

Fix building in some environments

Boost::interprocess seems to need linking against librt.so in some systems
This commit is contained in:
Carles Fernandez 2024-12-22 00:21:11 +01:00
parent 381cf4fb3c
commit c93f07176a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 17 additions and 0 deletions

View File

@ -1084,6 +1084,15 @@ endif()
################################################################################
# Detect availability of shm_open
################################################################################
unset(HAVE_SHM_OPEN CACHE)
include(CheckFunctionExists)
check_function_exists(shm_open HAVE_SHM_OPEN)
################################################################################
# volk_gnsssdr module - GNSS-SDR's own VOLK library
################################################################################

View File

@ -21,6 +21,7 @@ endif()
target_link_libraries(pvt_gr_blocks
PUBLIC
algorithms_libs_rtklib
Boost::headers
Boost::date_time
Gnuradio::pmt
Gnuradio::runtime

View File

@ -193,6 +193,13 @@ target_link_libraries(core_receiver
Armadillo::armadillo
)
if(NOT HAVE_SHM_OPEN)
find_library(LIBRT_LIBRARY rt)
if(LIBRT_LIBRARY)
target_link_libraries(core_receiver PRIVATE ${LIBRT_LIBRARY})
endif()
endif()
if(ENABLE_GLOG_AND_GFLAGS)
target_link_libraries(core_receiver PRIVATE Gflags::gflags Glog::glog)
target_compile_definitions(core_receiver PRIVATE -DUSE_GLOG_AND_GFLAGS=1)