1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Build: Linux: added airspyhf external library

This commit is contained in:
f4exb 2019-06-03 00:35:06 +02:00
parent 8a5ffe6b1f
commit 816e0e28e0
2 changed files with 21 additions and 8 deletions

View File

@ -16,6 +16,7 @@ set(DSDCC_TAG 952fb5f5f7bf1928a290ad62acce35492df13f5d)
set(LIMESUITE_TAG "v19.01.0")
set(BLADERF_TAG 896d2431b3a35a4b31b6e729386202ebf5fdc5c0)
set(LIBIIO_TAG 826563e41b5ce9890b75506f672017de8d76d52d)
set(AIRSPYHF_TAG "1.1.5")
# For some external project macros
@ -228,6 +229,22 @@ if (LINUX)
set(LIBIIO_FOUND 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 "")
# apt install libairspyhf-dev (only on ubuntu 18.04)
# needs libusb and pkgconfig
ExternalProject_Add(airspyhf
GIT_REPOSITORY https://github.com/airspy/airspyhf.git
GIT_TAG ${AIRSPYHF_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORY}
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Get_Property(airspyhf source_dir)
set(LIBAIRSPYHF_FOUND 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()
# already on the respository
@ -257,14 +274,6 @@ ExternalProject_Add(airspy
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspy"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LIBRARIES}
)
# apt install libairspyhf-dev (only on ubuntu 18.04)
# needs libusb and pkgconfig
ExternalProject_Add(airspyhf
GIT_REPOSITORY https://github.com/airspy/airspyhf.git
GIT_TAG 1.1.5
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LIBRARIES}
)
# apt install libhackrf-dev
# needs pkgconfig, libusb and fftw-3
ExternalProject_Add(hackrf

View File

@ -46,6 +46,10 @@ add_library(${TARGET_NAME} SHARED
${airspyhf_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(${TARGET_NAME} airspyhf)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}