Fixes for cmake restructure

master
Paul Sutton 9 years ago
parent af85656096
commit e5c8fdaf2d

@ -42,14 +42,19 @@ add_custom_target (add_srslte_headers SOURCES ${HEADERS_ALL})
########################################################################
# Find Dependencies
########################################################################
find_package(UHD)
find_package(bladeRF)
find_package(FFTW3F REQUIRED)
if(FFTW3F_FOUND)
include_directories(${FFTW3F_INCLUDE_DIRS})
link_directories(${FFTW3F_LIBRARY_DIRS})
endif(FFTW3F_FOUND)
find_package(UHD)
if(UHD_FOUND)
include_directories(${UHD_INCLUDE_DIRS})
link_directories(${UHD_LIBRARY_DIRS})
endif(UHD_FOUND)
find_package(bladeRF)
if(BLADERF_FOUND)
include_directories(${BLADERF_INCLUDE_DIRS})
link_directories(${BLADERF_LIBRARY_DIRS})

@ -37,8 +37,7 @@ add_executable(pdsch_enodeb pdsch_enodeb.c)
target_link_libraries(pdsch_enodeb srslte pthread)
if(RF_FOUND)
target_link_libraries(pdsch_ue srslte_rf)
target_link_libraries(pdsch_enodeb srslte_rf)
else(RF_FOUND)
add_definitions(-DDISABLE_RF)
endif(RF_FOUND)
@ -60,19 +59,19 @@ endif(SRSGUI_FOUND)
if(RF_FOUND)
add_executable(cell_search cell_search.c)
target_link_libraries(cell_search srslte srslte_rf)
target_link_libraries(cell_search srslte)
add_executable(cell_measurement cell_measurement.c)
target_link_libraries(cell_measurement srslte srslte_rf)
target_link_libraries(cell_measurement srslte)
add_executable(usrp_capture usrp_capture.c)
target_link_libraries(usrp_capture srslte srslte_rf)
target_link_libraries(usrp_capture srslte)
add_executable(usrp_capture_sync usrp_capture_sync.c)
target_link_libraries(usrp_capture_sync srslte srslte_rf)
target_link_libraries(usrp_capture_sync srslte)
add_executable(usrp_txrx usrp_txrx.c)
target_link_libraries(usrp_txrx srslte srslte_rf)
target_link_libraries(usrp_txrx srslte)
message(STATUS " examples will be installed.")

@ -26,10 +26,10 @@
if(SRSGUI_FOUND AND UHD_FOUND)
add_executable(pss pss.c)
target_link_libraries(pss srslte ${SRSGUI_LIBRARIES} srslte_rf)
target_link_libraries(pss srslte ${SRSGUI_LIBRARIES})
add_executable(simple_tx simple_tx.c)
target_link_libraries(simple_tx srslte srslte_rf)
target_link_libraries(simple_tx srslte)
endif(SRSGUI_FOUND AND UHD_FOUND)

@ -35,27 +35,38 @@ add_subdirectory(resampling)
add_subdirectory(scrambling)
add_subdirectory(ue)
add_library(srslte SHARED version.c)
target_link_libraries(srslte srslte_agc
srslte_ch_estimation
srslte_common
srslte_fec
srslte_mimo
srslte_phch
srslte_sync
srslte_utils
srslte_channel
srslte_dft
srslte_io
srslte_modem
srslte_resampling
srslte_scrambling
srslte_ue
srslte_rf
pthread)
add_library(srslte SHARED version.c
$<TARGET_OBJECTS:srslte_agc>
$<TARGET_OBJECTS:srslte_ch_estimation>
$<TARGET_OBJECTS:srslte_common>
$<TARGET_OBJECTS:srslte_fec>
$<TARGET_OBJECTS:srslte_mimo>
$<TARGET_OBJECTS:srslte_phch>
$<TARGET_OBJECTS:srslte_sync>
$<TARGET_OBJECTS:srslte_utils>
$<TARGET_OBJECTS:srslte_channel>
$<TARGET_OBJECTS:srslte_dft>
$<TARGET_OBJECTS:srslte_io>
$<TARGET_OBJECTS:srslte_modem>
$<TARGET_OBJECTS:srslte_resampling>
$<TARGET_OBJECTS:srslte_scrambling>
$<TARGET_OBJECTS:srslte_ue>
$<TARGET_OBJECTS:srslte_rf>
)
target_link_libraries(srslte pthread m ${FFTW3F_LIBRARIES})
set_target_properties(srslte PROPERTIES
VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR})
if(RF_FOUND)
if(UHD_FOUND)
target_link_libraries(srslte ${UHD_LIBRARIES})
endif(UHD_FOUND)
if(BLADERF_FOUND)
target_link_libraries(srslte ${BLADERF_LIBRARIES})
endif(BLADERF_FOUND)
endif(RF_FOUND)
if(VOLK_FOUND)
set_target_properties(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}")
target_link_libraries(srslte ${VOLK_LIBRARIES})

@ -19,4 +19,5 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_agc ${SOURCES})
add_library(srslte_agc OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_agc)

@ -19,9 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_ch_estimation ${SOURCES})
target_link_libraries(srslte_ch_estimation srslte_common
srslte_resampling
srslte_utils
srslte_phch)
add_library(srslte_ch_estimation OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_ch_estimation)
add_subdirectory(test)

@ -19,4 +19,5 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_channel ${SOURCES})
add_library(srslte_channel OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_channel)

@ -19,4 +19,5 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_common ${SOURCES})
add_library(srslte_common OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_common)

@ -18,18 +18,7 @@
# and at http://www.gnu.org/licenses/.
#
find_package(FFTW3F REQUIRED)
if(FFTW3F_FOUND)
include_directories(${FFTW3F_INCLUDE_DIRS})
link_directories(${FFTW3F_LIBRARY_DIRS})
endif(FFTW3F_FOUND)
set(SRCS dft_fftw.c dft_precoding.c ofdm.c)
add_library(srslte_dft ${SRCS})
target_link_libraries(srslte_dft srslte_utils
m
${FFTW3F_LIBRARIES})
add_library(srslte_dft OBJECT ${SRCS})
SRSLTE_SET_PIC(srslte_dft)
add_subdirectory(test)

@ -19,6 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_fec ${SOURCES})
target_link_libraries(srslte_fec srslte_utils)
add_library(srslte_fec OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_fec)
add_subdirectory(test)

@ -19,4 +19,5 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_io ${SOURCES})
add_library(srslte_io OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_io)

@ -19,5 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_mimo ${SOURCES})
add_library(srslte_mimo OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_mimo)
add_subdirectory(test)

@ -19,5 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_modem ${SOURCES})
add_library(srslte_modem OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_modem)
add_subdirectory(test)

@ -19,11 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_phch ${SOURCES})
target_link_libraries(srslte_phch srslte_common
srslte_mimo
srslte_fec
srslte_modem
srslte_scrambling
srslte_ch_estimation)
add_library(srslte_phch OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_phch)
add_subdirectory(test)

@ -195,5 +195,5 @@ BuildMex(MEXNAME prach SOURCES prach_test_mex.c LIBRARIES srslte srslte_mex)
if(UHD_FOUND)
add_executable(prach_test_usrp prach_test_usrp.c)
target_link_libraries(prach_test_usrp srslte_rf srslte pthread)
target_link_libraries(prach_test_usrp srslte pthread)
endif(UHD_FOUND)

@ -19,5 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_resampling ${SOURCES})
add_library(srslte_resampling OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_resampling)
add_subdirectory(test)

@ -33,15 +33,6 @@ if(RF_FOUND)
list(APPEND SOURCES_RF rf_blade_imp.c)
endif (BLADERF_FOUND)
add_library(srslte_rf ${SOURCES_RF})
target_link_libraries(srslte_rf pthread)
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)
add_library(srslte_rf OBJECT ${SOURCES_RF})
SRSLTE_SET_PIC(srslte_rf)
endif(RF_FOUND)

@ -19,5 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_scrambling ${SOURCES})
add_library(srslte_scrambling OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_scrambling)
add_subdirectory(test)

@ -19,6 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_sync ${SOURCES})
target_link_libraries(srslte_sync srslte_common)
add_library(srslte_sync OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_sync)
add_subdirectory(test)

@ -33,7 +33,7 @@ endif(SRSGUI_FOUND)
if(UHD_FOUND)
add_executable(pss_usrp pss_usrp.c)
target_link_libraries(pss_usrp srslte srslte_rf)
target_link_libraries(pss_usrp srslte)
if(SRSGUI_FOUND)
target_link_libraries(pss_usrp ${SRSGUI_LIBRARIES})
else(SRSGUI_FOUND)

@ -19,9 +19,5 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_ue ${SOURCES})
target_link_libraries(srslte_ue srslte_io
srslte_sync
srslte_dft
srslte_ch_estimation
srslte_agc)
add_library(srslte_ue OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_ue)

@ -19,6 +19,6 @@
#
file(GLOB SOURCES "*.c")
add_library(srslte_utils ${SOURCES})
target_link_libraries(srslte_utils srslte_dft)
add_library(srslte_utils OBJECT ${SOURCES})
SRSLTE_SET_PIC(srslte_utils)
add_subdirectory(test)

Loading…
Cancel
Save