2016-11-02 10:51:45 -04:00
|
|
|
project(bladerf)
|
|
|
|
|
2018-11-24 15:21:04 -05:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
2016-11-02 10:51:45 -04:00
|
|
|
find_package(LibUSB)
|
|
|
|
|
|
|
|
add_definitions(-DBLADERF_OS_LINUX)
|
|
|
|
|
|
|
|
set(bladerf_SOURCES
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFCOMMONSRC}/src/sha256.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/dc_calibration.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/parse.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/devcfg.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/conversions.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/log.c
|
|
|
|
${LIBBLADERFCOMMONSRC}/src/str_queue.c
|
|
|
|
${LIBBLADERFSRC}/host/misc/dev/lms_freqsel/freqsel.c
|
2018-09-19 19:41:28 -04:00
|
|
|
${LIBBLADERFSRC}/fpga_common/src/lms.c
|
|
|
|
${LIBBLADERFSRC}/fpga_common/src/band_select.c
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/interleave.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/timeout.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/wallclock.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/configfile.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/file.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/version.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/fpga_trigger.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/si5338.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/dac161s055.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/fx3_fw.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/smb_clock.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/dac_core.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/ad9361.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/util.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/platform.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/ad9361_api.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/adc_core.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/ad9361_conv.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/spi_flash.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/ina219.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/compatibility.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/capabilities.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/params.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/bladerf2.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/board.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/flash.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/bladerf1.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/image.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/compatibility.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/calibration.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/capabilities.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb100.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb200.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb300.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/async.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/sync_worker.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/sync.c
|
2016-11-02 10:51:45 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/bladerf.c
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/init_fini.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/backend/dummy/dummy.c
|
2016-11-02 10:51:45 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/backend.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/usb.c
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/libusb.c
|
2016-11-02 10:51:45 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/nios_access.c
|
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/nios_legacy_access.c
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/devinfo.c
|
2016-11-02 10:51:45 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(bladerf_HEADERS
|
2018-09-19 19:19:34 -04:00
|
|
|
./common/include/host_config.h
|
|
|
|
./libraries/libbladeRF/src/version.h
|
|
|
|
./libraries/libbladeRF/src/backend/backend_config.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/thread.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/parse.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/minmax.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/rel_assert.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/devcfg.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/str_queue.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/log.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/dc_calibration.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/sha256.h
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/conversions.h
|
2018-09-19 19:41:28 -04:00
|
|
|
${LIBBLADERFSRC}/fpga_common/include/lms.h
|
|
|
|
${LIBBLADERFSRC}/fpga_common/include/band_select.h
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/interleave.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/wallclock.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/timeout.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/version.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/configfile.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/helpers/file.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/dac161s055.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/fpga_trigger.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/si5338.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/ina219.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/platform.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/util.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/dac_core.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/config.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/adc_core.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/common.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/ad9361.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/thirdparty/adi/ad9361_api.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/spi_flash.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/fx3_fw.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/driver/smb_clock.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/capabilities.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf2/compatibility.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/board.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/calibration.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/capabilities.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/compatibility.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/board/bladerf1/flash.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb300.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb100.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/expansion/xb200.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/sync.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/sync_worker.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/metadata.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/format.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/streaming/async.h
|
2016-11-02 10:51:45 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/backend.h
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/dummy/dummy.h
|
2016-11-02 10:51:45 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/nios_legacy_access.h
|
2018-09-19 19:19:34 -04:00
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/nios_access.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/backend/usb/usb.h
|
|
|
|
${LIBBLADERFLIBSRC}/src/devinfo.h
|
|
|
|
${LIBBLADERFLIBSRC}/include/bladeRF2.h
|
|
|
|
${LIBBLADERFLIBSRC}/include/libbladeRF.h
|
|
|
|
${LIBBLADERFLIBSRC}/include/bladeRF1.h
|
2016-11-02 10:51:45 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${LIBUSB_INCLUDE_DIR}
|
|
|
|
${LIBBLADERFLIBSRC}/include
|
|
|
|
${LIBBLADERFLIBSRC}/src
|
|
|
|
${LIBBLADERFSRC}/firmware_common
|
|
|
|
${LIBBLADERFSRC}/fpga_common/include
|
|
|
|
${LIBBLADERFCOMMONSRC}/include
|
|
|
|
${LIBBLADERFCOMMONSRC}/include/windows
|
|
|
|
./include
|
2018-09-19 19:19:34 -04:00
|
|
|
./common/include
|
|
|
|
./libraries/libbladeRF/src
|
|
|
|
./libraries/libbladeRF/src/backend
|
2016-11-02 10:51:45 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
|
|
|
|
add_library(bladerf SHARED
|
|
|
|
${bladerf_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(bladerf
|
|
|
|
${LIBUSB_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS bladerf DESTINATION lib)
|
2018-09-19 19:19:34 -04:00
|
|
|
|