diff --git a/CMakeLists.txt b/CMakeLists.txt index e40737900..269b5a6a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,20 +74,30 @@ set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.") ######################################################################## # Find dependencies ######################################################################## + +# Threads find_package(Threads REQUIRED) +# FFT find_package(MKL) if(MKL_FOUND) include_directories(${MKL_INCLUDE_DIRS}) link_directories(${MKL_LIBRARY_DIRS}) + set(FFT_LIBRARIES "${MKL_STATIC_LIBRARIES}") # Static by default else(MKL_FOUND) find_package(FFTW3F REQUIRED) if(FFTW3F_FOUND) include_directories(${FFTW3F_INCLUDE_DIRS}) link_directories(${FFTW3F_LIBRARY_DIRS}) + if(BUILD_STATIC) + set(FFT_LIBRARIES "${FFTW3F_STATIC_LIBRARIES}") + else(BUILD_STATIC) + set(FFT_LIBRARIES "${FFTW3F_LIBRARIES}") + endif(BUILD_STATIC) endif(FFTW3F_FOUND) endif(MKL_FOUND) +# Crypto find_package(Polarssl) if (POLARSSL_FOUND) set(SEC_INCLUDE_DIRS "${POLARSSL_INCLUDE_DIRS}") @@ -112,12 +122,14 @@ else(POLARSSL_FOUND) endif (MBEDTLS_FOUND) endif(POLARSSL_FOUND) +# UHD find_package(UHD) if(UHD_FOUND) include_directories(${UHD_INCLUDE_DIRS}) link_directories(${UHD_LIBRARY_DIRS}) endif(UHD_FOUND) +# BladeRF if(ENABLE_BLADERF) find_package(bladeRF) if(BLADERF_FOUND) @@ -126,6 +138,7 @@ if(ENABLE_BLADERF) endif(BLADERF_FOUND) endif(ENABLE_BLADERF) +# Soapy find_package(SoapySDR) if(SOAPYSDR_FOUND) include_directories(${SOAPYSDR_INCLUDE_DIRS}) @@ -139,8 +152,8 @@ else(BLADERF_FOUND OR UHD_FOUND OR SOAPYSDR_FOUND) add_definitions(-DDISABLE_RF) endif(BLADERF_FOUND OR UHD_FOUND OR SOAPYSDR_FOUND) +# Boost if(ENABLE_SRSUE OR ENABLE_SRSENB) - # Find Boost if(BUILD_STATIC) set(Boost_USE_STATIC_LIBS ON) endif(BUILD_STATIC) @@ -164,7 +177,7 @@ if(ENABLE_SRSUE OR ENABLE_SRSENB) find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) endif(ENABLE_SRSUE OR ENABLE_SRSENB) - +# srsGUI if(ENABLE_GUI) find_package(SRSGUI) if(SRSGUI_FOUND) @@ -174,6 +187,7 @@ if(ENABLE_GUI) endif(SRSGUI_FOUND) endif(ENABLE_GUI) +# VOLK include(CheckFunctionExistsMath) if(ENABLE_VOLK) find_package(Volk) @@ -188,7 +202,6 @@ else(ENABLE_VOLK) message(STATUS "VOLK library disabled") endif(ENABLE_VOLK) - ######################################################################## # Install Dirs ######################################################################## diff --git a/lib/src/phy/CMakeLists.txt b/lib/src/phy/CMakeLists.txt index bd5ae332d..572ff19c3 100644 --- a/lib/src/phy/CMakeLists.txt +++ b/lib/src/phy/CMakeLists.txt @@ -55,24 +55,7 @@ set(srslte_srcs $ ) add_library(srslte_phy STATIC ${srslte_srcs}) -set_target_properties(srslte_phy PROPERTIES - VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}) - -if(MKL_FOUND) - if(BUILD_STATIC) - target_link_libraries(srslte_phy ${MKL_STATIC_LIBRARIES}) - else(BUILD_STATIC) - target_link_libraries(srslte_phy ${MKL_LIBRARIES}) - endif(BUILD_STATIC) -else(MKL_FOUND) - if(BUILD_STATIC) - target_link_libraries(srslte_phy ${FFTW3F_STATIC_LIBRARIES}) - else(BUILD_STATIC) - target_link_libraries(srslte_phy ${FFTW3F_LIBRARIES}) - endif(BUILD_STATIC) - -endif(MKL_FOUND) - +target_link_libraries(srslte_phy ${FFT_LIBRARIES}) if(VOLK_FOUND) target_link_libraries(srslte_phy ${VOLK_LIBRARIES})