rf: build srsran_rf as static library

For Ubuntu 18.04: Linking the static srsran_rf to libuhd
also requires to link Boost's "system" library.

Newer systems do not require this special handling.
master
Robert Falkenberg 3 years ago committed by Andre Puschmann
parent 085d561f65
commit 02f261c0a9

@ -268,6 +268,9 @@ endif(BUILD_STATIC)
set(BOOST_REQUIRED_COMPONENTS
program_options
)
if(UHD_FOUND) # Ubuntu 18.04 requires component 'system' to link UHD
list(APPEND BOOST_REQUIRED_COMPONENTS "system")
endif(UHD_FOUND)
if(UNIX AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
endif(UNIX AND EXISTS "/usr/lib64")

@ -59,12 +59,12 @@ if(RF_FOUND)
list(APPEND SOURCES_RF rf_zmq_imp.c rf_zmq_imp_tx.c rf_zmq_imp_rx.c)
endif (ZEROMQ_FOUND)
add_library(srsran_rf SHARED ${SOURCES_RF})
add_library(srsran_rf STATIC ${SOURCES_RF})
target_link_libraries(srsran_rf srsran_rf_utils srsran_phy)
set_target_properties(srsran_rf PROPERTIES VERSION ${SRSRAN_VERSION_STRING} SOVERSION ${SRSRAN_SOVERSION})
if (UHD_FOUND)
target_link_libraries(srsran_rf ${UHD_LIBRARIES})
target_link_libraries(srsran_rf ${UHD_LIBRARIES} ${Boost_LIBRARIES}) # Ubuntu 18.04 requires 'system' from Boost_LIBRARIES
endif (UHD_FOUND)
if (BLADERF_FOUND)

Loading…
Cancel
Save