mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-27 02:09:14 -05:00
70 lines
1.3 KiB
CMake
70 lines
1.3 KiB
CMake
project(hackrf)
|
|
|
|
set(hackrf_SOURCES
|
|
hackrfgui.cpp
|
|
hackrfinput.cpp
|
|
hackrfplugin.cpp
|
|
hackrfsettings.cpp
|
|
hackrfthread.cpp
|
|
)
|
|
|
|
set(hackrf_HEADERS
|
|
hackrfgui.h
|
|
hackrfinput.h
|
|
hackrfplugin.h
|
|
hackrfsettings.h
|
|
hackrfthread.h
|
|
)
|
|
|
|
set(hackrf_FORMS
|
|
hackrfgui.ui
|
|
)
|
|
|
|
if (BUILD_DEBIAN)
|
|
include_directories(
|
|
.
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${LIBHACKRFSRC}
|
|
${LIBHACKRFSRC}/libhackrf/src
|
|
)
|
|
else (BUILD_DEBIAN)
|
|
include_directories(
|
|
.
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${LIBHACKRF_INCLUDE_DIR}
|
|
)
|
|
endif (BUILD_DEBIAN)
|
|
|
|
#include(${QT_USE_FILE})
|
|
#add_definitions(${QT_DEFINITIONS})
|
|
add_definitions("${QT_DEFINITIONS} -DLIBHACKRF_DYN_RATES")
|
|
add_definitions(-DQT_PLUGIN)
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
#qt4_wrap_cpp(hackrf_HEADERS_MOC ${hackrf_HEADERS})
|
|
qt5_wrap_ui(hackrf_FORMS_HEADERS ${hackrf_FORMS})
|
|
|
|
add_library(inputhackrf SHARED
|
|
${hackrf_SOURCES}
|
|
${hackrf_HEADERS_MOC}
|
|
${hackrf_FORMS_HEADERS}
|
|
)
|
|
|
|
if (BUILD_DEBIAN)
|
|
target_link_libraries(inputhackrf
|
|
${QT_LIBRARIES}
|
|
hackrf
|
|
sdrbase
|
|
)
|
|
else (BUILD_DEBIAN)
|
|
target_link_libraries(inputhackrf
|
|
${QT_LIBRARIES}
|
|
${LIBHACKRF_LIBRARIES}
|
|
sdrbase
|
|
)
|
|
endif (BUILD_DEBIAN)
|
|
|
|
qt5_use_modules(inputhackrf Core Widgets)
|
|
|
|
install(TARGETS inputhackrf DESTINATION lib/plugins/samplesource)
|