mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-24 11:04:10 -04:00
cmake: full refactor to remove qmake and use cmake on all platforms
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
project(xtrxoutput)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(xtrxoutput_SOURCES
|
||||
xtrxoutputgui.cpp
|
||||
xtrxoutput.cpp
|
||||
xtrxoutputplugin.cpp
|
||||
xtrxoutputsettings.cpp
|
||||
@@ -11,46 +8,54 @@ set(xtrxoutput_SOURCES
|
||||
)
|
||||
|
||||
set(xtrxoutput_HEADERS
|
||||
xtrxoutputgui.h
|
||||
xtrxoutput.h
|
||||
xtrxoutputplugin.h
|
||||
xtrxoutputsettings.h
|
||||
xtrxoutputthread.h
|
||||
)
|
||||
|
||||
set(xtrxoutput_FORMS
|
||||
xtrxoutputgui.ui
|
||||
)
|
||||
|
||||
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
|
||||
${LIBXTRX_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
if(NOT SERVER_MODE)
|
||||
set(xtrxoutput_SOURCES
|
||||
${xtrxoutput_SOURCES}
|
||||
xtrxoutputgui.cpp
|
||||
|
||||
qt5_wrap_ui(xtrxoutput_FORMS_HEADERS ${xtrxoutput_FORMS})
|
||||
xtrxoutputgui.ui
|
||||
)
|
||||
set(xtrxoutput_HEADERS
|
||||
${xtrxoutput_HEADERS}
|
||||
xtrxoutputgui.h
|
||||
)
|
||||
|
||||
add_library(outputxtrx SHARED
|
||||
set(TARGET_NAME outputxtrx)
|
||||
set(TARGET_LIB "Qt5::Widgets")
|
||||
set(TARGET_LIB_GUI "sdrgui")
|
||||
set(INSTALL_FOLDER "plugins")
|
||||
else()
|
||||
set(TARGET_NAME outputxtrxsrv)
|
||||
set(TARGET_LIB "")
|
||||
set(TARGET_LIB_GUI "")
|
||||
set(INSTALL_FOLDER "pluginssrv")
|
||||
endif()
|
||||
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
${xtrxoutput_SOURCES}
|
||||
${xtrxoutput_HEADERS_MOC}
|
||||
${xtrxoutput_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(outputxtrx
|
||||
${QT_LIBRARIES}
|
||||
${LIBXTRX_LIBRARY}
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
${TARGET_LIB}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
xtrxdevice
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
${LIBXTRX_LIBRARY}
|
||||
xtrxdevice
|
||||
)
|
||||
|
||||
target_link_libraries(outputxtrx Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS outputxtrx DESTINATION lib/plugins/samplesink)
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink)
|
||||
|
||||
Reference in New Issue
Block a user