2014-05-18 15:52:39 +00:00
|
|
|
project(rtlsdr)
|
|
|
|
|
2017-12-06 22:49:14 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
set(rtlsdr_SOURCES
|
2016-10-25 22:57:46 +00:00
|
|
|
rtlsdrgui.cpp
|
|
|
|
rtlsdrinput.cpp
|
|
|
|
rtlsdrplugin.cpp
|
|
|
|
rtlsdrsettings.cpp
|
|
|
|
rtlsdrthread.cpp
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(rtlsdr_HEADERS
|
2016-10-25 22:57:46 +00:00
|
|
|
rtlsdrgui.h
|
|
|
|
rtlsdrinput.h
|
|
|
|
rtlsdrplugin.h
|
|
|
|
rtlsdrsettings.h
|
|
|
|
rtlsdrthread.h
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(rtlsdr_FORMS
|
2016-10-25 22:57:46 +00:00
|
|
|
rtlsdrgui.ui
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
2016-10-25 22:57:46 +00:00
|
|
|
if (BUILD_DEBIAN)
|
2014-05-18 15:52:39 +00:00
|
|
|
include_directories(
|
2016-10-25 22:57:46 +00:00
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2017-12-06 22:49:14 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
2016-10-25 22:57:46 +00:00
|
|
|
${LIBRTLSDRSRC}/include
|
|
|
|
${LIBRTLSDRSRC}/src
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
2016-10-25 22:57:46 +00:00
|
|
|
else (BUILD_DEBIAN)
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2017-12-06 22:49:14 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
2016-11-28 01:17:08 +00:00
|
|
|
${LIBRTLSDR_INCLUDE_DIR}
|
2016-10-25 22:57:46 +00:00
|
|
|
)
|
|
|
|
endif (BUILD_DEBIAN)
|
2014-05-18 15:52:39 +00:00
|
|
|
|
|
|
|
#include(${QT_USE_FILE})
|
|
|
|
add_definitions(${QT_DEFINITIONS})
|
|
|
|
add_definitions(-DQT_PLUGIN)
|
|
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
|
|
|
|
#qt4_wrap_cpp(rtlsdr_HEADERS_MOC ${rtlsdr_HEADERS})
|
|
|
|
qt5_wrap_ui(rtlsdr_FORMS_HEADERS ${rtlsdr_FORMS})
|
|
|
|
|
|
|
|
add_library(inputrtlsdr SHARED
|
2016-10-25 22:57:46 +00:00
|
|
|
${rtlsdr_SOURCES}
|
|
|
|
${rtlsdr_HEADERS_MOC}
|
|
|
|
${rtlsdr_FORMS_HEADERS}
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
2016-10-25 22:57:46 +00:00
|
|
|
if (BUILD_DEBIAN)
|
2014-05-18 15:52:39 +00:00
|
|
|
target_link_libraries(inputrtlsdr
|
2016-10-25 22:57:46 +00:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
rtlsdr
|
|
|
|
sdrbase
|
2017-10-22 17:12:43 +00:00
|
|
|
sdrgui
|
2017-12-06 22:49:14 +00:00
|
|
|
swagger
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
2016-10-25 22:57:46 +00:00
|
|
|
else (BUILD_DEBIAN)
|
|
|
|
target_link_libraries(inputrtlsdr
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
${LIBRTLSDR_LIBRARIES}
|
|
|
|
sdrbase
|
2017-10-22 17:12:43 +00:00
|
|
|
sdrgui
|
2017-12-06 22:49:14 +00:00
|
|
|
swagger
|
2016-10-25 22:57:46 +00:00
|
|
|
)
|
|
|
|
endif (BUILD_DEBIAN)
|
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2018-06-12 22:20:51 +00:00
|
|
|
target_link_libraries(inputrtlsdr Qt5::Core Qt5::Widgets)
|
2016-02-24 10:51:36 +00:00
|
|
|
|
|
|
|
install(TARGETS inputrtlsdr DESTINATION lib/plugins/samplesource)
|