2016-12-26 21:14:50 -05:00
|
|
|
project(hackrfinput)
|
2015-09-23 20:50:24 -04:00
|
|
|
|
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}
|
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}
|
|
|
|
${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
|
|
|
|
)
|
|
|
|
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
|
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
|
|
|
|
2016-10-27 02:38:50 -04:00
|
|
|
qt5_use_modules(inputhackrf Core Widgets)
|
2016-02-24 05:51:36 -05:00
|
|
|
|
|
|
|
install(TARGETS inputhackrf DESTINATION lib/plugins/samplesource)
|