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