mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 16:34:45 -04:00
cmake: full refactor to remove qmake and use cmake on all platforms
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
project(remoteoutput)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "RemoteFEC: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
@@ -12,76 +10,63 @@ else()
|
||||
endif()
|
||||
|
||||
set(remoteoutput_SOURCES
|
||||
remoteoutputgui.cpp
|
||||
remoteoutput.cpp
|
||||
remoteoutputplugin.cpp
|
||||
remoteoutputsettings.cpp
|
||||
remoteoutputthread.cpp
|
||||
udpsinkfec.cpp
|
||||
udpsinkfecworker.cpp
|
||||
udpsinkfec.cpp
|
||||
udpsinkfecworker.cpp
|
||||
)
|
||||
|
||||
set(remoteoutput_HEADERS
|
||||
remoteoutputgui.h
|
||||
remoteoutput.h
|
||||
remoteoutputplugin.h
|
||||
remoteoutputsettings.h
|
||||
remoteoutputthread.h
|
||||
udpsinkfec.h
|
||||
udpsinkfecworker.h
|
||||
udpsinkfec.h
|
||||
udpsinkfecworker.h
|
||||
)
|
||||
|
||||
set(remoteoutput_FORMS
|
||||
remoteoutputgui.ui
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}/..
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${CMAKE_SOURCE_DIR}/devices
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
if(NOT SERVER_MODE)
|
||||
set(remoteoutput_SOURCES
|
||||
${remoteoutput_SOURCES}
|
||||
remoteoutputgui.cpp
|
||||
|
||||
qt5_wrap_ui(remoteoutput_FORMS_HEADERS ${remoteoutput_FORMS})
|
||||
remoteoutputgui.ui
|
||||
)
|
||||
set(remoteoutput_HEADERS
|
||||
${remoteoutput_HEADERS}
|
||||
remoteoutputgui.h
|
||||
)
|
||||
|
||||
add_library(outputremote SHARED
|
||||
set(TARGET_NAME outputremote)
|
||||
set(TARGET_LIB "Qt5::Widgets")
|
||||
set(TARGET_LIB_GUI "sdrgui")
|
||||
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
|
||||
else()
|
||||
set(TARGET_NAME outputremotesrv)
|
||||
set(TARGET_LIB "")
|
||||
set(TARGET_LIB_GUI "")
|
||||
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
|
||||
endif()
|
||||
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
${remoteoutput_SOURCES}
|
||||
${remoteoutput_HEADERS_MOC}
|
||||
${remoteoutput_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(outputremote
|
||||
${QT_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
cm256cc
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(outputremote
|
||||
${QT_LIBRARIES}
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
${TARGET_LIB}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
${CM256CC_LIBRARIES}
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
${CM256CC_LIBRARIES}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(outputremote Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS outputremote DESTINATION lib/plugins/samplesink)
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
|
||||
Reference in New Issue
Block a user