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