diff --git a/srslte/lib/CMakeLists.txt b/srslte/lib/CMakeLists.txt index 6047ac78d..88431bcde 100644 --- a/srslte/lib/CMakeLists.txt +++ b/srslte/lib/CMakeLists.txt @@ -55,10 +55,6 @@ set(srslte_srcs version.c $ ) -if(RF_FOUND) - list(APPEND srslte_srcs $) -endif(RF_FOUND) - add_library(srslte SHARED ${srslte_srcs}) target_link_libraries(srslte pthread m) set_target_properties(srslte PROPERTIES @@ -87,7 +83,11 @@ else(MKL_FOUND) endif(NOT DisableMEX) endif(MKL_FOUND) +## This linkage is required for the examples and tests only if(RF_FOUND) + + target_link_libraries(srslte srslte_rf) + if(UHD_FOUND) target_link_libraries(srslte ${UHD_LIBRARIES}) endif(UHD_FOUND) diff --git a/srslte/lib/rf/CMakeLists.txt b/srslte/lib/rf/CMakeLists.txt index 3b97dfecf..00e4dd6a4 100644 --- a/srslte/lib/rf/CMakeLists.txt +++ b/srslte/lib/rf/CMakeLists.txt @@ -33,6 +33,15 @@ if(RF_FOUND) list(APPEND SOURCES_RF rf_blade_imp.c) endif (BLADERF_FOUND) - add_library(srslte_rf OBJECT ${SOURCES_RF}) + add_library(srslte_rf SHARED ${SOURCES_RF}) + + if (UHD_FOUND) + target_link_libraries(srslte_rf ${UHD_LIBRARIES}) + endif (UHD_FOUND) + + if (BLADERF_FOUND) + target_link_libraries(srslte_rf ${BLADERF_LIBRARIES}) + endif (BLADERF_FOUND) + SRSLTE_SET_PIC(srslte_rf) -endif(RF_FOUND) +endif(RF_FOUND) \ No newline at end of file