mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Added more flexible build options
This commit is contained in:
parent
634821296d
commit
d9ea8d4abc
@ -108,6 +108,10 @@ if(NOT DEBUG_OUTPUT)
|
||||
add_definitions("-DQT_NO_DEBUG_OUTPUT")
|
||||
endif()
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO")
|
||||
set(AUTO_EXTERNAL_LIBRARIES ON CACHE INTERNAL "")
|
||||
endif(ENABLE_EXTERNAL_LIBRARIES)
|
||||
|
||||
# declare build structures
|
||||
# !! change sdrbase/plugins/pluginmanager.cpp too !!
|
||||
set(SDRANGEL_BINARY_BIN_DIR "${CMAKE_BINARY_DIR}/bin")
|
||||
|
@ -1,3 +1,4 @@
|
||||
if (NOT CM256CC_FOUND)
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_CM256cc "libcm256cc")
|
||||
|
||||
@ -34,3 +35,4 @@ endif(CM256CC_INCLUDE_DIR AND CM256CC_LIBRARIES)
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CM256CC DEFAULT_MSG CM256CC_LIBRARIES CM256CC_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(CM256CC_LIBRARIES CM256CC_INCLUDE_DIR)
|
||||
endif (NOT CM256CC_FOUND)
|
@ -1,3 +1,4 @@
|
||||
if (NOT CODEC2_FOUND)
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_CODEC2 "codec2")
|
||||
|
||||
@ -34,3 +35,4 @@ endif()
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CODEC2 DEFAULT_MSG CODEC2_LIBRARIES CODEC2_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(CODEC2_LIBRARIES CODEC2_INCLUDE_DIR)
|
||||
endif (NOT CODEC2_FOUND)
|
@ -1,5 +1,5 @@
|
||||
# Find libmbe
|
||||
|
||||
if (NOT LIBMBE_FOUND)
|
||||
find_path(LIBMBE_INCLUDE_DIR
|
||||
NAMES mbelib.h
|
||||
HINTS ${MBE_DIR}/include
|
||||
@ -9,25 +9,26 @@ find_path(LIBMBE_INCLUDE_DIR
|
||||
|
||||
set(LIBMBE_NAMES ${LIBMBE_NAMES} mbe libmbe)
|
||||
|
||||
find_library(LIBMBE_LIBRARY
|
||||
find_library(LIBMBE_LIBRARIES
|
||||
NAMES ${LIBMBE_NAMES}
|
||||
HINTS ${MBE_DIR}/lib
|
||||
PATHS /usr/include
|
||||
/usr/local/include
|
||||
PATHS /usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARY)
|
||||
set(LIBMBE_FOUND TRUE)
|
||||
endif (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARY)
|
||||
if (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARIES)
|
||||
set(LIBMBE_FOUND TRUE CACHE INTERNAL "libmbe found")
|
||||
|
||||
if (LIBMBE_FOUND)
|
||||
if (NOT LibMbe_FIND_QUIETLY)
|
||||
message(STATUS "Found LibMbe: ${LIBMBE_INCLUDE_DIR}, ${LIBMBE_LIBRARY}")
|
||||
endif (NOT LibMbe_FIND_QUIETLY)
|
||||
else (LIBMBE_FOUND)
|
||||
if (LibMbe_FIND_REQUIRED)
|
||||
message (FATAL_ERROR "Could not find mbe")
|
||||
endif (LibMbe_FIND_REQUIRED)
|
||||
endif (LIBMBE_FOUND)
|
||||
else (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARIES)
|
||||
set(LIBMBE_FOUND FALSE CACHE INTERNAL "libmbe found")
|
||||
|
||||
mark_as_advanced(LIBMBE_INCLUDE_DIR LIBMBE_LIBRARY)
|
||||
if (LibMbe_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find LibMbe")
|
||||
endif (LibMbe_FIND_REQUIRED)
|
||||
endif (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARIES)
|
||||
|
||||
mark_as_advanced(LIBMBE_INCLUDE_DIR LIBMBE_LIBRARIES)
|
||||
endif (NOT LIBMBE_FOUND)
|
@ -1,5 +1,5 @@
|
||||
# Find Lime Suite
|
||||
|
||||
if (NOT LIMESUITE_FOUND)
|
||||
if (NOT LIMESUITE_INCLUDE_DIR)
|
||||
find_path (LIMESUITE_INCLUDE_DIR
|
||||
NAMES lime/LimeSuite.h
|
||||
@ -23,13 +23,12 @@ if (NOT LIMESUITE_LIBRARY)
|
||||
endif()
|
||||
|
||||
if (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
||||
set(LIMESUITE_FOUND TRUE)
|
||||
set(LIMESUITE_FOUND TRUE CACHE INTERNAL "")
|
||||
message (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
|
||||
else (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
||||
set(LIMESUITE_FOUND FALSE CACHE INTERNAL "")
|
||||
message (STATUS "Could not find Lime Suite")
|
||||
endif (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
||||
|
||||
if (LIMESUITE_FOUND)
|
||||
message (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
|
||||
else (LIMESUITE_FOUND)
|
||||
message (STATUS "Could not find Lime Suite")
|
||||
endif (LIMESUITE_FOUND)
|
||||
|
||||
mark_as_advanced(LIMESUITE_INCLUDE_DIR LIMESUITE_LIBRARY)
|
||||
endif (NOT LIMESUITE_FOUND)
|
@ -1,5 +1,5 @@
|
||||
# Find serialDV
|
||||
|
||||
if (NOT LIBSERIALDV_FOUND)
|
||||
find_path(LIBSERIALDV_INCLUDE_DIR
|
||||
NAMES dvcontroller.h
|
||||
HINTS ${SERIALDV_DIR}/include/serialdv
|
||||
@ -17,17 +17,18 @@ find_library(LIBSERIALDV_LIBRARY
|
||||
)
|
||||
|
||||
if (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
|
||||
set(LIBSERIALDV_FOUND TRUE)
|
||||
endif (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
|
||||
set(LIBSERIALDV_FOUND TRUE CACHE INTERNAL "")
|
||||
|
||||
if (LIBSERIALDV_FOUND)
|
||||
if (NOT SerialDV_FIND_QUIETLY)
|
||||
message (STATUS "Found libserialdv: ${LIBSERIALDV_INCLUDE_DIR}, ${LIBSERIALDV_LIBRARY}")
|
||||
endif (NOT SerialDV_FIND_QUIETLY)
|
||||
else (LIBSERIALDV_FOUND)
|
||||
else (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
|
||||
set(LIBSERIALDV_FOUND FALSE CACHE INTERNAL "")
|
||||
|
||||
if (SerialDV_FIND_REQUIRED)
|
||||
message (FATAL_ERROR "Could not find SerialDV")
|
||||
endif (SerialDV_FIND_REQUIRED)
|
||||
endif (LIBSERIALDV_FOUND)
|
||||
endif (LIBSERIALDV_INCLUDE_DIR AND LIBSERIALDV_LIBRARY)
|
||||
|
||||
mark_as_advanced(LIBSERIALDV_INCLUDE_DIR LIBSERIALDV_LIBRARY)
|
||||
endif (NOT LIBSERIALDV_FOUND)
|
0
debian/rules
vendored
Normal file → Executable file
0
debian/rules
vendored
Normal file → Executable file
@ -21,7 +21,7 @@ add_library(bladerf1device SHARED
|
||||
${bladerf1device_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(bladerf1device bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -18,7 +18,7 @@ add_library(bladerf2device SHARED
|
||||
${bladerf2device_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(bladerf2device bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -29,7 +29,7 @@ target_link_libraries(hackrfdevice
|
||||
sdrbase
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES AND NOT LINUX)
|
||||
if(LIBHACKRF_EXTERNAL AND NOT LINUX)
|
||||
add_dependencies(hackrfdevice hackrf)
|
||||
endif()
|
||||
|
||||
|
@ -28,7 +28,7 @@ target_link_libraries(limesdrdevice
|
||||
sdrbase
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIMESUITE_EXTERNAL)
|
||||
add_dependencies(limesdrdevice limesuite)
|
||||
endif()
|
||||
|
||||
|
@ -19,7 +19,7 @@ add_library(perseusdevice SHARED
|
||||
${perseusdevice_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBPERSEUS_EXTERNAL)
|
||||
add_dependencies(perseusdevice perseus)
|
||||
endif()
|
||||
|
||||
|
@ -35,7 +35,7 @@ target_link_libraries(plutosdrdevice
|
||||
${ICONV_LIBRARY}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBIIO_EXTERNAL)
|
||||
add_dependencies(plutosdrdevice libiio)
|
||||
endif()
|
||||
|
||||
|
@ -30,7 +30,7 @@ target_link_libraries(soapysdrdevice
|
||||
sdrbase
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES AND NOT LINUX)
|
||||
if(SOAPYSDR_EXTERNAL AND NOT LINUX)
|
||||
add_dependencies(soapysdrdevice soapysdr)
|
||||
endif()
|
||||
|
||||
|
88
external/CMakeLists.txt
vendored
88
external/CMakeLists.txt
vendored
@ -18,6 +18,7 @@ set(BLADERF_TAG "2019.07")
|
||||
set(LIBIIO_TAG 826563e41b5ce9890b75506f672017de8d76d52d)
|
||||
set(AIRSPYHF_TAG "1.1.5")
|
||||
set(PERSEUS_TAG afefa23e3140ac79d845acb68cf0beeb86d09028)
|
||||
set(MIRISDR_TAG "v1.1.2")
|
||||
|
||||
set(PTHREADS4W_TAG "Version-2-11-0-release")
|
||||
set(RTLSDR_TAG be1d1206bfb6e6c41f7d91b20b77e20f929fa6a7)
|
||||
@ -134,7 +135,22 @@ if(WIN32)
|
||||
install(FILES "${EXTERNAL_LIBRARY_FOLDER}/vcredist/${VCREDIST_FILE}" DESTINATION "${INSTALL_BIN_DIR}")
|
||||
endif (WIN32)
|
||||
|
||||
if(NOT WIN32)
|
||||
if (AUTO_EXTERNAL_LIBRARIES)
|
||||
find_package(Codec2)
|
||||
find_package(CM256cc)
|
||||
find_package(LibMbe)
|
||||
find_package(SerialDV)
|
||||
find_package(LibDSDcc)
|
||||
find_package(LimeSuite)
|
||||
find_package(LibBLADERF)
|
||||
find_package(LibMiriSDR)
|
||||
find_package(LibIIO)
|
||||
find_package(LibAIRSPYHF)
|
||||
find_package(LibPerseus)
|
||||
find_package(LibRTLSDR)
|
||||
endif (AUTO_EXTERNAL_LIBRARIES)
|
||||
|
||||
if (NOT WIN32 AND (NOT CODEC2_FOUND OR CODEC2_EXTERNAL))
|
||||
# needs speexdsp
|
||||
ExternalProject_Add(codec2
|
||||
GIT_REPOSITORY https://github.com/drowe67/codec2.git
|
||||
@ -146,6 +162,7 @@ if(NOT WIN32)
|
||||
)
|
||||
ExternalProject_Get_Property(codec2 source_dir binary_dir)
|
||||
set(CODEC2_FOUND ON CACHE INTERNAL "")
|
||||
set(CODEC2_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(CODEC2_INCLUDE_DIR "${source_dir}/src" "${binary_dir}" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(CODEC2_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/codec2.lib" CACHE INTERNAL "")
|
||||
@ -158,10 +175,10 @@ if(NOT WIN32)
|
||||
# some source include "codec2/comp.h" and some without codec2
|
||||
makeLink("${source_dir}/src" "${source_dir}/src/codec2" codec2)
|
||||
endif ()
|
||||
endif()
|
||||
endif (NOT WIN32 AND (NOT CODEC2_FOUND OR CODEC2_EXTERNAL))
|
||||
|
||||
if (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL))
|
||||
# needs boost
|
||||
if(NOT APPLE)
|
||||
ExternalProject_Add(cm256cc
|
||||
GIT_REPOSITORY https://github.com/f4exb/cm256cc.git
|
||||
GIT_TAG ${CM256CC_TAG}
|
||||
@ -177,6 +194,7 @@ if(NOT APPLE)
|
||||
)
|
||||
ExternalProject_Get_Property(cm256cc source_dir binary_dir)
|
||||
set(CM256CC_FOUND ON CACHE INTERNAL "")
|
||||
set(CM256CC_EXTERNAL ON CACHE INTERNAL "")
|
||||
# we need cm256cc/library.h
|
||||
set(CM256CC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/cm256cc/src" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
@ -190,8 +208,9 @@ if(NOT APPLE)
|
||||
FILES_MATCHING PATTERN "libcm256cc*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}")
|
||||
endif ()
|
||||
endif() # NOT APPLE
|
||||
endif (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL))
|
||||
|
||||
if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EXTERNAL))
|
||||
set(USE_MBELIB OFF)
|
||||
ExternalProject_Add(mbelib
|
||||
GIT_REPOSITORY https://github.com/szechyjs/mbelib.git
|
||||
@ -205,19 +224,22 @@ ExternalProject_Get_Property(mbelib source_dir binary_dir)
|
||||
set(USE_MBELIB ON)
|
||||
set(DSDCC_DEPENDS mbelib)
|
||||
set(LIBMBE_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBMBE_INCLUDE_DIR "${source_dir}")
|
||||
set(LIBMBE_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBMBE_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBMBE_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/mbe.lib")
|
||||
set(LIBMBE_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/mbe.lib" CACHE INTERNAL "")
|
||||
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/mbe${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
|
||||
elseif (LINUX)
|
||||
set(LIBMBE_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(LIBMBE_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
|
||||
elseif (APPLE)
|
||||
set(LIBMBE_LIBRARIES "${binary_dir}/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(LIBMBE_LIBRARIES "${binary_dir}/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
|
||||
install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}"
|
||||
FILES_MATCHING PATTERN "libmbe*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}")
|
||||
endif ()
|
||||
endif ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EXTERNAL))
|
||||
|
||||
if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
|
||||
# Works on MacOS with a dummy serialDV
|
||||
ExternalProject_Add(serialdv
|
||||
GIT_REPOSITORY https://github.com/f4exb/serialDV.git
|
||||
@ -225,11 +247,13 @@ ExternalProject_Add(serialdv
|
||||
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/serialdv"
|
||||
CMAKE_ARGS -DBUILD_TOOL=OFF ${DEFAULT_OUTPUT_DIRECTORIES}
|
||||
INSTALL_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
ExternalProject_Get_Property(serialdv source_dir binary_dir)
|
||||
set(DSDCC_DEPENDS ${DSDCC_DEPENDS} serialdv)
|
||||
set(LIBSERIALDV_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBSERIALDV_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBSERIALDV_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBSERIALDV_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/serialdv.lib" CACHE INTERNAL "")
|
||||
@ -249,7 +273,9 @@ elseif(APPLE)
|
||||
FILES_MATCHING PATTERN "libserialdv*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}")
|
||||
endif ()
|
||||
endif (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
|
||||
|
||||
if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND)
|
||||
ExternalProject_Add(dsdcc
|
||||
GIT_REPOSITORY https://github.com/f4exb/dsdcc.git
|
||||
GIT_TAG ${DSDCC_TAG}
|
||||
@ -266,6 +292,7 @@ ExternalProject_Add(dsdcc
|
||||
)
|
||||
ExternalProject_Get_Property(dsdcc source_dir binary_dir)
|
||||
set(LIBDSDCC_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBDSDCC_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBDSDCC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/dsdcc/src" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBDSDCC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/dsdcc.lib" CACHE INTERNAL "")
|
||||
@ -278,6 +305,7 @@ elseif(APPLE)
|
||||
FILES_MATCHING PATTERN "libdsdcc*${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}/")
|
||||
endif ()
|
||||
endif ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND)
|
||||
|
||||
# requirements needed by many packages on windows
|
||||
if (WIN32)
|
||||
@ -295,6 +323,7 @@ if(WIN32)
|
||||
ExternalProject_Get_Property(pthreads4w source_dir binary_dir)
|
||||
set(PTHREADS4W_DEPENDS pthreads4w)
|
||||
set(PTHREADS4W_FOUND ON CACHE INTERNAL "")
|
||||
set(PTHREADS4W_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(PTHREADS4W_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
|
||||
set(PTHREADS4W_LIBRARIES "${source_dir}/pthreadVC2.lib" CACHE INTERNAL "")
|
||||
makeCopy("${source_dir}/pthreadVC2${CMAKE_SHARED_LIBRARY_SUFFIX}" "${SDRANGEL_BINARY_BIN_DIR}/pthreadVC2${CMAKE_SHARED_LIBRARY_SUFFIX}" pthreads4w)
|
||||
@ -307,6 +336,7 @@ endif(WIN32)
|
||||
if (LINUX)
|
||||
# apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it.
|
||||
# needs pkgconfig and libusb
|
||||
if (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL)
|
||||
ExternalProject_Add(limesuite
|
||||
GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git
|
||||
GIT_TAG ${LIMESUITE_TAG}
|
||||
@ -317,12 +347,15 @@ if (LINUX)
|
||||
)
|
||||
ExternalProject_Get_Property(limesuite source_dir)
|
||||
set(LIMESUITE_FOUND ON CACHE INTERNAL "")
|
||||
set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/limesuite/src/limesuite/src" CACHE INTERNAL "")
|
||||
set(LIMESUITE_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libLimeSuite.so" CACHE INTERNAL "")
|
||||
makeCopyFile("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite)
|
||||
endif (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL)
|
||||
|
||||
# apt install libbladerf-dev
|
||||
# needs pkgconfig and libusb
|
||||
if (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL)
|
||||
ExternalProject_Add(bladerf
|
||||
GIT_REPOSITORY https://github.com/Nuand/bladeRF.git
|
||||
GIT_TAG ${BLADERF_TAG}
|
||||
@ -334,11 +367,14 @@ if (LINUX)
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
set(LIBBLADERF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBBLADERF_INCLUDE_DIRS "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf/host/libraries/libbladeRF/include" CACHE INTERNAL "")
|
||||
set(LIBBLADERF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libbladeRF.so" CACHE INTERNAL "")
|
||||
endif (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL)
|
||||
|
||||
# apt install libiio-dev
|
||||
# needs pkgconfig, libusb, libxml2, lzma, xz, libiconv
|
||||
if (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL)
|
||||
ExternalProject_Add(libiio
|
||||
GIT_REPOSITORY https://github.com/analogdevicesinc/libiio.git
|
||||
GIT_TAG ${LIBIIO_TAG}
|
||||
@ -348,11 +384,14 @@ if (LINUX)
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
set(LIBIIO_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBIIO_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBIIO_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libiio/src/libiio" CACHE INTERNAL "")
|
||||
set(LIBIIO_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libiio.so" CACHE INTERNAL "")
|
||||
endif (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL)
|
||||
|
||||
# apt install libairspyhf-dev (only on ubuntu 18.04)
|
||||
# needs libusb and pkgconfig
|
||||
if (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL)
|
||||
ExternalProject_Add(airspyhf
|
||||
GIT_REPOSITORY https://github.com/airspy/airspyhf.git
|
||||
GIT_TAG ${AIRSPYHF_TAG}
|
||||
@ -363,11 +402,14 @@ if (LINUX)
|
||||
)
|
||||
ExternalProject_Get_Property(airspyhf source_dir)
|
||||
set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/.." CACHE INTERNAL "")
|
||||
set(LIBAIRSPYHF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libairspyhf.so" CACHE INTERNAL "")
|
||||
makeLink("${source_dir}/libairspyhf/src" "${source_dir}/../libairspyhf" airspyhf)
|
||||
endif (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL)
|
||||
|
||||
# needs pkgconfig, libusb, autoconf, automake and libtool
|
||||
if (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL)
|
||||
ExternalProject_Add(perseus
|
||||
GIT_REPOSITORY https://github.com/f4exb/libperseus-sdr.git
|
||||
GIT_TAG ${PERSEUS_TAG}
|
||||
@ -377,11 +419,14 @@ if (LINUX)
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
set(LIBPERSEUS_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBPERSEUS_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBPERSEUS_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/perseus/src/perseus" CACHE INTERNAL "")
|
||||
set(LIBPERSEUS_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libperseus-sdr.so" CACHE INTERNAL "")
|
||||
endif (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL)
|
||||
|
||||
# apt install librtlsdr-dev
|
||||
# needs pkgconfig and libusb
|
||||
if (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL)
|
||||
ExternalProject_Add(rtlsdr
|
||||
GIT_REPOSITORY https://github.com/osmocom/rtl-sdr.git
|
||||
GIT_TAG ${RTLSDR_TAG}
|
||||
@ -391,8 +436,26 @@ if (LINUX)
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
set(LIBRTLSDR_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBRTLSDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr/src/rtlsdr/include" CACHE INTERNAL "")
|
||||
set(LIBRTLSDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/librtlsdr.so" CACHE INTERNAL "")
|
||||
endif (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL)
|
||||
|
||||
# needs pkgconfig and libusb
|
||||
if (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL)
|
||||
ExternalProject_Add(libmirisdr
|
||||
GIT_REPOSITORY https://github.com/f4exb/libmirisdr-4.git
|
||||
GIT_TAG ${MIRISDR_TAG}
|
||||
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr"
|
||||
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES}
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
set(LIBMIRISDR_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBMIRISDR_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBMIRISDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr/src/libmirisdr/include" CACHE INTERNAL "")
|
||||
set(LIBMIRISDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmirisdr.so" CACHE INTERNAL "")
|
||||
endif (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL)
|
||||
endif (LINUX)
|
||||
|
||||
if (WIN32 OR APPLE)
|
||||
@ -419,6 +482,7 @@ if(WIN32 OR APPLE)
|
||||
)
|
||||
ExternalProject_Get_Property(rtlsdr source_dir binary_dir)
|
||||
set(LIBRTLSDR_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBRTLSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBRTLSDR_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/rtlsdr.lib" CACHE INTERNAL "")
|
||||
@ -452,6 +516,7 @@ if(WIN32 OR APPLE)
|
||||
)
|
||||
ExternalProject_Get_Property(limesuite source_dir binary_dir)
|
||||
set(LIMESUITE_FOUND ON CACHE INTERNAL "")
|
||||
set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIMESUITE_INCLUDE_DIR "${source_dir}/src" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIMESUITE_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/LimeSuite.lib" CACHE INTERNAL "")
|
||||
@ -479,6 +544,7 @@ if(WIN32 OR APPLE)
|
||||
)
|
||||
ExternalProject_Get_Property(soapysdr source_dir binary_dir)
|
||||
set(SOAPYSDR_FOUND ON CACHE INTERNAL "")
|
||||
set(SOAPYSDR_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(SOAPYSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(SOAPYSDR_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/SoapySDR.lib" CACHE INTERNAL "")
|
||||
@ -514,6 +580,7 @@ if(WIN32 OR APPLE)
|
||||
add_dependencies(airspy pthreads4w)
|
||||
ExternalProject_Get_Property(airspy source_dir binary_dir)
|
||||
set(LIBAIRSPY_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPY_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPY_INCLUDE_DIR "${source_dir}/libairspy/src" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBAIRSPY_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspy.lib" CACHE INTERNAL "")
|
||||
@ -552,6 +619,7 @@ if(WIN32 OR APPLE)
|
||||
add_dependencies(airspyhf pthreads4w)
|
||||
ExternalProject_Get_Property(airspyhf source_dir binary_dir)
|
||||
set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/libairspyhf/src" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBAIRSPYHF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspyhf.lib" CACHE INTERNAL "")
|
||||
@ -596,6 +664,7 @@ if(WIN32 OR APPLE)
|
||||
add_dependencies(hackrf pthreads4w)
|
||||
ExternalProject_Get_Property(hackrf source_dir binary_dir)
|
||||
set(LIBHACKRF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBHACKRF_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBHACKRF_INCLUDE_DIR "${source_dir}/host/libhackrf" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBHACKRF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/hackrf.lib" CACHE INTERNAL "")
|
||||
@ -641,6 +710,7 @@ if(WIN32 OR APPLE)
|
||||
ExternalProject_Get_Property(libxml2 source_dir binary_dir)
|
||||
set(LIBXML2_DEPENDS libxml2)
|
||||
set(LIBXML2_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBXML2_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBXML2_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBXML2_LIBRARIES "${source_dir}/win32/bin.msvc/libxml2.lib" CACHE INTERNAL "")
|
||||
@ -675,6 +745,7 @@ if(WIN32 OR APPLE)
|
||||
add_dependencies(libiio pthreads4w)
|
||||
ExternalProject_Get_Property(libiio source_dir binary_dir)
|
||||
set(LIBIIO_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBIIO_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBIIO_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBIIO_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/libiio.lib" CACHE INTERNAL "")
|
||||
@ -717,6 +788,7 @@ if(WIN32 OR APPLE)
|
||||
add_dependencies(bladerf pthreads4w)
|
||||
ExternalProject_Get_Property(bladerf source_dir binary_dir)
|
||||
set(LIBBLADERF_FOUND ON CACHE INTERNAL "")
|
||||
set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "")
|
||||
set(LIBBLADERF_INCLUDE_DIRS "${source_dir}/host/libraries/libbladeRF/include" CACHE INTERNAL "")
|
||||
if (WIN32)
|
||||
set(LIBBLADERF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/bladeRF.lib" CACHE INTERNAL "")
|
||||
|
@ -57,7 +57,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${dsddemod_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBDSDCC_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} dsdcc)
|
||||
endif()
|
||||
|
||||
@ -67,7 +67,7 @@ target_link_libraries(${TARGET_NAME}
|
||||
sdrbase
|
||||
${TARGET_LIB_GUI}
|
||||
${LIBDSDCC_LIBRARIES}
|
||||
${LIBMBE_LIBRARY}
|
||||
${LIBMBE_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
|
||||
|
@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${freedv_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CODEC2_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} codec2)
|
||||
endif()
|
||||
|
||||
|
@ -63,7 +63,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${remotesink_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CM256CC_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} cm256cc)
|
||||
endif()
|
||||
|
||||
|
@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${modfreedv_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CODEC2_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} codec2)
|
||||
endif()
|
||||
|
||||
|
@ -63,7 +63,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${remotesource_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CM256CC_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} cm256cc)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${bladerf1output_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${bladerf2output_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${limesdroutput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIMESUITE_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} limesuite)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${plutosdroutput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBIIO_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} libiio)
|
||||
endif()
|
||||
|
||||
|
@ -63,7 +63,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${remoteoutput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CM256CC_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} cm256cc)
|
||||
endif()
|
||||
|
||||
|
@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${airspy_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES AND NOT LINUX)
|
||||
if(LIBAIRSPY_EXTERNAL AND NOT LINUX)
|
||||
add_dependencies(${TARGET_NAME} airspy)
|
||||
endif()
|
||||
|
||||
|
@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${airspyhf_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBAIRSPYHF_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} airspyhf)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${bladerf1input_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${bladerf2input_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBBLADERF_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} bladerf)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${limesdrinput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIMESUITE_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} limesuite)
|
||||
endif()
|
||||
|
||||
|
@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${perseus_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBPERSEUS_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} perseus)
|
||||
endif()
|
||||
|
||||
|
@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${plutosdrinput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(LIBIIO_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} libiio)
|
||||
endif()
|
||||
|
||||
|
@ -60,7 +60,7 @@ add_library(${TARGET_NAME} SHARED
|
||||
${remoteinput_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES)
|
||||
if(CM256CC_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} cm256cc)
|
||||
endif()
|
||||
|
||||
|
@ -48,6 +48,10 @@ add_library(${TARGET_NAME} SHARED
|
||||
${sdrplay_SOURCES}
|
||||
)
|
||||
|
||||
if(LIBMIRISDR_EXTERNAL)
|
||||
add_dependencies(${TARGET_NAME} libmirisdr)
|
||||
endif(LIBMIRISDR_EXTERNAL)
|
||||
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
${TARGET_LIB}
|
||||
|
@ -326,7 +326,11 @@ add_library(sdrbase SHARED
|
||||
${sdrbase_SOURCES}
|
||||
)
|
||||
|
||||
if(ENABLE_EXTERNAL_LIBRARIES AND LIBSERIALDV_FOUND)
|
||||
if(LIMESUITE_EXTERNAL)
|
||||
add_dependencies(sdrbase limesuite)
|
||||
endif()
|
||||
|
||||
if(LIBSERIALDV_EXTERNAL)
|
||||
add_dependencies(sdrbase serialdv)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user