2018-02-05 02:38:47 -05:00
|
|
|
project(airspyhfi)
|
2018-02-01 03:12:38 -05:00
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
set(airspyhfi_SOURCES
|
|
|
|
airspyhfigui.cpp
|
|
|
|
airspyhfiinput.cpp
|
|
|
|
airspyhfiplugin.cpp
|
|
|
|
airspyhfisettings.cpp
|
|
|
|
airspyhfithread.cpp
|
2018-02-01 03:12:38 -05:00
|
|
|
)
|
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
set(airspyhfi_HEADERS
|
|
|
|
airspyhfigui.h
|
|
|
|
airspyhfiinput.h
|
|
|
|
airspyhfiplugin.h
|
|
|
|
airspyhfisettings.h
|
|
|
|
airspyhfithread.h
|
2018-02-01 03:12:38 -05:00
|
|
|
)
|
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
set(airspyhfi_FORMS
|
|
|
|
airspyhfigui.ui
|
2018-02-01 03:12:38 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
if (BUILD_DEBIAN)
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
|
|
|
${LIBAIRSPYHFSRC}
|
|
|
|
${LIBAIRSPYHFSRC}/libairspyhf/src
|
|
|
|
)
|
|
|
|
else (BUILD_DEBIAN)
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
|
|
|
${LIBAIRSPYHF_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
endif (BUILD_DEBIAN)
|
|
|
|
|
|
|
|
#include(${QT_USE_FILE})
|
|
|
|
#add_definitions(${QT_DEFINITIONS})
|
|
|
|
add_definitions("${QT_DEFINITIONS} -DLIBAIRSPY_DYN_RATES")
|
|
|
|
add_definitions(-DQT_PLUGIN)
|
|
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
#qt4_wrap_cpp(airspyhf_HEADERS_MOC ${airspyhf_HEADERS})
|
|
|
|
qt5_wrap_ui(airspyhfi_FORMS_HEADERS ${airspyhfi_FORMS})
|
2018-02-01 03:12:38 -05:00
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
add_library(inputairspyhfi SHARED
|
|
|
|
${airspyhfi_SOURCES}
|
|
|
|
${airspyhfi_HEADERS_MOC}
|
|
|
|
${airspyhfi_FORMS_HEADERS}
|
2018-02-01 03:12:38 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
if (BUILD_DEBIAN)
|
2018-02-05 02:38:47 -05:00
|
|
|
target_link_libraries(inputairspyhfi
|
2018-02-01 03:12:38 -05:00
|
|
|
${QT_LIBRARIES}
|
2018-02-05 02:38:47 -05:00
|
|
|
airspyhf
|
2018-02-01 03:12:38 -05:00
|
|
|
sdrbase
|
|
|
|
sdrgui
|
|
|
|
swagger
|
|
|
|
)
|
|
|
|
else (BUILD_DEBIAN)
|
2018-02-05 02:38:47 -05:00
|
|
|
target_link_libraries(inputairspyhfi
|
2018-02-01 03:12:38 -05:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
${LIBAIRSPYHF_LIBRARIES}
|
|
|
|
sdrbase
|
|
|
|
sdrgui
|
|
|
|
swagger
|
|
|
|
)
|
|
|
|
endif (BUILD_DEBIAN)
|
|
|
|
|
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
qt5_use_modules(inputairspyhfi Core Widgets)
|
2018-02-01 03:12:38 -05:00
|
|
|
|
2018-02-05 02:38:47 -05:00
|
|
|
install(TARGETS inputairspyhfi DESTINATION lib/plugins/samplesource)
|