Build: Linux: added libbladeRF external library

pull/361/head
f4exb 2019-06-02 23:28:37 +02:00
rodzic 67be5a86d9
commit c885105a87
7 zmienionych plików z 44 dodań i 11 usunięć

Wyświetl plik

@ -21,6 +21,10 @@ add_library(bladerf1device SHARED
${bladerf1device_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(bladerf1device bladerf)
endif()
set_target_properties(bladerf1device
PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")

Wyświetl plik

@ -18,6 +18,10 @@ add_library(bladerf2device SHARED
${bladerf2device_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(bladerf2device bladerf)
endif()
set_target_properties(bladerf2device
PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")

Wyświetl plik

@ -14,6 +14,7 @@ set(MBELIB_TAG "debian/1.3.0")
set(SERIALDV_TAG abd65a0fc2d5339808194862d14119b0cba70424)
set(DSDCC_TAG 952fb5f5f7bf1928a290ad62acce35492df13f5d)
set(LIMESUITE_TAG "v19.01.0")
set(BLADERF_TAG 896d2431b3a35a4b31b6e729386202ebf5fdc5c0)
# For some external project macros
@ -181,9 +182,10 @@ else()
set(LIBDSDCC_LIBRARIES "${binary_dir}/libdsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif()
# Device interface libraries. Use external libraries build for these. Only Linux for now.
if (LINUX)
# apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it. Linux only for now.
# needs pkgconfig, libusb and sqlite3
# apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it.
# needs pkgconfig and libusb
ExternalProject_Add(limesuite
GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git
GIT_TAG ${LIMESUITE_TAG}
@ -195,6 +197,22 @@ if (LINUX)
set(LIMESUITE_FOUND 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 "")
# apt install libbladerf-dev
# needs pkgconfig and libusb
ExternalProject_Add(bladerf
GIT_REPOSITORY https://github.com/Nuand/bladeRF.git
GIT_TAG ${BLADERF_TAG}
GIT_SUBMODULES
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORY}
SOURCE_SUBDIR host/
INSTALL_COMMAND ""
TEST_COMMAND ""
)
set(LIBBLADERF_FOUND 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()
# already on the respository
@ -249,15 +267,6 @@ ExternalProject_Add(rtlsdr
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LIBRARIES}
)
# apt install libbladerf-dev
# needs pkgconfig and libusb
ExternalProject_Add(bladerf
GIT_REPOSITORY https://github.com/Nuand/bladeRF.git
GIT_TAG 1da130cb5ac9e9f722737e9aee141ecccebef00d
GIT_SUBMODULES
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LIBRARIES}
)
# apt install libmirisdr-dev
# needs pkgconfig and libusb
ExternalProject_Add(mirisdr

Wyświetl plik

@ -47,6 +47,10 @@ add_library(${TARGET_NAME} SHARED
${bladerf1output_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(${TARGET_NAME} bladerf)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}

Wyświetl plik

@ -47,6 +47,10 @@ add_library(${TARGET_NAME} SHARED
${bladerf2output_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(${TARGET_NAME} bladerf)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}

Wyświetl plik

@ -47,6 +47,10 @@ add_library(${TARGET_NAME} SHARED
${bladerf1input_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(${TARGET_NAME} bladerf)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}

Wyświetl plik

@ -47,6 +47,10 @@ add_library(${TARGET_NAME} SHARED
${bladerf2input_SOURCES}
)
if(ENABLE_EXTERNAL_LIBRARIES)
add_dependencies(${TARGET_NAME} bladerf)
endif()
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}