2016-12-27 03:14:50 +01:00
|
|
|
project(hackrfinput)
|
2015-09-24 02:50:24 +02:00
|
|
|
|
2017-12-10 01:57:50 +01:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
2016-12-27 03:14:50 +01:00
|
|
|
set(hackrfinput_SOURCES
|
2016-12-27 02:25:06 +01:00
|
|
|
hackrfinputgui.cpp
|
2016-10-26 00:57:46 +02:00
|
|
|
hackrfinput.cpp
|
2016-12-27 02:25:06 +01:00
|
|
|
hackrfinputplugin.cpp
|
|
|
|
hackrfinputsettings.cpp
|
|
|
|
hackrfinputthread.cpp
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
|
|
|
|
2016-12-27 03:14:50 +01:00
|
|
|
set(hackrfinput_HEADERS
|
2016-12-27 02:25:06 +01:00
|
|
|
hackrfinputgui.h
|
2016-10-26 00:57:46 +02:00
|
|
|
hackrfinput.h
|
2016-12-27 02:25:06 +01:00
|
|
|
hackrfinputplugin.h
|
|
|
|
hackrfinputsettings.h
|
|
|
|
hackrfinputthread.h
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
|
|
|
|
2016-12-27 03:14:50 +01:00
|
|
|
set(hackrfinput_FORMS
|
2016-12-27 02:25:06 +01:00
|
|
|
hackrfinputgui.ui
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
|
|
|
|
2016-10-26 00:57:46 +02:00
|
|
|
if (BUILD_DEBIAN)
|
2015-09-24 02:50:24 +02:00
|
|
|
include_directories(
|
2016-06-29 10:00:38 +02:00
|
|
|
.
|
2016-10-26 00:57:46 +02:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2017-12-10 01:57:50 +01:00
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
2017-01-07 11:24:09 +01:00
|
|
|
${CMAKE_SOURCE_DIR}/devices
|
2016-10-26 02:40:00 +02:00
|
|
|
${LIBHACKRFSRC}
|
|
|
|
${LIBHACKRFSRC}/libhackrf/src
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
2016-10-26 00:57:46 +02:00
|
|
|
else (BUILD_DEBIAN)
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2017-12-10 01:57:50 +01:00
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
2017-01-07 11:24:09 +01:00
|
|
|
${CMAKE_SOURCE_DIR}/devices
|
2016-10-26 00:57:46 +02:00
|
|
|
${LIBHACKRF_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
endif (BUILD_DEBIAN)
|
2015-09-24 02:50:24 +02:00
|
|
|
|
|
|
|
#include(${QT_USE_FILE})
|
|
|
|
#add_definitions(${QT_DEFINITIONS})
|
|
|
|
add_definitions("${QT_DEFINITIONS} -DLIBHACKRF_DYN_RATES")
|
|
|
|
add_definitions(-DQT_PLUGIN)
|
|
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
|
2016-12-27 03:14:50 +01:00
|
|
|
#qt4_wrap_cpp(hackrfinput_HEADERS_MOC ${hackrfinput_HEADERS})
|
|
|
|
qt5_wrap_ui(hackrfinput_FORMS_HEADERS ${hackrfinput_FORMS})
|
2015-09-24 02:50:24 +02:00
|
|
|
|
|
|
|
add_library(inputhackrf SHARED
|
2016-12-27 03:14:50 +01:00
|
|
|
${hackrfinput_SOURCES}
|
|
|
|
${hackrfinput_HEADERS_MOC}
|
|
|
|
${hackrfinput_FORMS_HEADERS}
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
|
|
|
|
2016-10-26 00:57:46 +02:00
|
|
|
if (BUILD_DEBIAN)
|
|
|
|
target_link_libraries(inputhackrf
|
|
|
|
${QT_LIBRARIES}
|
2016-10-26 01:08:39 +02:00
|
|
|
hackrf
|
2016-10-26 00:57:46 +02:00
|
|
|
sdrbase
|
2017-10-22 19:12:43 +02:00
|
|
|
sdrgui
|
2017-12-10 01:57:50 +01:00
|
|
|
swagger
|
2017-01-07 11:24:09 +01:00
|
|
|
hackrfdevice
|
2016-10-26 00:57:46 +02:00
|
|
|
)
|
|
|
|
else (BUILD_DEBIAN)
|
2015-09-24 02:50:24 +02:00
|
|
|
target_link_libraries(inputhackrf
|
2016-10-26 00:57:46 +02:00
|
|
|
${QT_LIBRARIES}
|
2016-10-26 01:08:39 +02:00
|
|
|
${LIBHACKRF_LIBRARIES}
|
2016-10-26 00:57:46 +02:00
|
|
|
sdrbase
|
2017-10-22 19:12:43 +02:00
|
|
|
sdrgui
|
2017-12-10 01:57:50 +01:00
|
|
|
swagger
|
2017-01-07 11:24:09 +01:00
|
|
|
hackrfdevice
|
2015-09-24 02:50:24 +02:00
|
|
|
)
|
2016-10-26 00:57:46 +02:00
|
|
|
endif (BUILD_DEBIAN)
|
2015-09-24 02:50:24 +02:00
|
|
|
|
2018-06-13 00:20:51 +02:00
|
|
|
target_link_libraries(inputhackrf Qt5::Core Qt5::Widgets)
|
2016-02-24 11:51:36 +01:00
|
|
|
|
|
|
|
install(TARGETS inputhackrf DESTINATION lib/plugins/samplesource)
|