mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 13:47:01 -04:00
cmake: full refactor to remove qmake and use cmake on all platforms
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
project(remoteinput)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "RemoteInput: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
@@ -14,7 +12,6 @@ endif()
|
||||
set(remoteinput_SOURCES
|
||||
remoteinputbuffer.cpp
|
||||
remoteinputudphandler.cpp
|
||||
remoteinputgui.cpp
|
||||
remoteinput.cpp
|
||||
remoteinputsettings.cpp
|
||||
remoteinputplugin.cpp
|
||||
@@ -23,63 +20,51 @@ set(remoteinput_SOURCES
|
||||
set(remoteinput_HEADERS
|
||||
remoteinputbuffer.h
|
||||
remoteinputudphandler.h
|
||||
remoteinputgui.h
|
||||
remoteinput.h
|
||||
remoteinputsettings.h
|
||||
remoteinputplugin.h
|
||||
)
|
||||
|
||||
set(remoteinput_FORMS
|
||||
remoteinputgui.ui
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
qt5_wrap_ui(remoteinput_FORMS_HEADERS ${remoteinput_FORMS})
|
||||
|
||||
add_library(inputremote SHARED
|
||||
${remoteinput_SOURCES}
|
||||
${remoteinput_HEADERS_MOC}
|
||||
${remoteinput_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(inputremote PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}/..
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(inputremote PUBLIC
|
||||
.
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(inputremote
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
if(NOT SERVER_MODE)
|
||||
set(remoteinput_SOURCES
|
||||
${remoteinput_SOURCES}
|
||||
remoteinputgui.cpp
|
||||
|
||||
remoteinputgui.ui
|
||||
)
|
||||
set(remoteinput_HEADERS
|
||||
${remoteinput_HEADERS}
|
||||
remoteinputgui.h
|
||||
)
|
||||
|
||||
set(TARGET_NAME inputremote)
|
||||
set(TARGET_LIB "Qt5::Widgets")
|
||||
set(TARGET_LIB_GUI "sdrgui")
|
||||
set(INSTALL_FOLDER "plugins")
|
||||
else()
|
||||
set(TARGET_NAME inputremotesrv)
|
||||
set(TARGET_LIB "")
|
||||
set(TARGET_LIB_GUI "")
|
||||
set(INSTALL_FOLDER "pluginssrv")
|
||||
endif()
|
||||
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
${remoteinput_SOURCES}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputremote
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
${TARGET_LIB}
|
||||
sdrbase
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
${CM256CC_LIBRARIES}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(inputremote Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS inputremote DESTINATION lib/plugins/samplesource)
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource)
|
||||
|
||||
Reference in New Issue
Block a user