mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
cmake: full refactor to remove qmake and use cmake on all platforms
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
project(testsource)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(testsource_SOURCES
|
||||
testsourcegui.cpp
|
||||
testsourceinput.cpp
|
||||
testsourceplugin.cpp
|
||||
testsourcethread.cpp
|
||||
@@ -11,44 +8,50 @@ set(testsource_SOURCES
|
||||
)
|
||||
|
||||
set(testsource_HEADERS
|
||||
testsourcegui.h
|
||||
testsourceinput.h
|
||||
testsourceplugin.h
|
||||
testsourcethread.h
|
||||
testsourcesettings.h
|
||||
)
|
||||
|
||||
set(testsource_FORMS
|
||||
testsourcegui.ui
|
||||
)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
if(NOT SERVER_MODE)
|
||||
set(testsource_SOURCES
|
||||
${testsource_SOURCES}
|
||||
testsourcegui.cpp
|
||||
|
||||
#qt4_wrap_cpp(testsource_HEADERS_MOC ${testsource_HEADERS})
|
||||
qt5_wrap_ui(testsource_FORMS_HEADERS ${testsource_FORMS})
|
||||
testsourcegui.ui
|
||||
)
|
||||
set(testsource_HEADERS
|
||||
${testsource_HEADERS}
|
||||
testsourcegui.h
|
||||
)
|
||||
|
||||
add_library(inputtestsource SHARED
|
||||
set(TARGET_NAME inputtestsource)
|
||||
set(TARGET_LIB "Qt5::Widgets")
|
||||
set(TARGET_LIB_GUI "sdrgui")
|
||||
set(INSTALL_FOLDER "plugins")
|
||||
else()
|
||||
set(TARGET_NAME inputtestsourcesrv)
|
||||
set(TARGET_LIB "")
|
||||
set(TARGET_LIB_GUI "")
|
||||
set(INSTALL_FOLDER "pluginssrv")
|
||||
endif()
|
||||
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
${testsource_SOURCES}
|
||||
${testsource_HEADERS_MOC}
|
||||
${testsource_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(inputtestsource
|
||||
${QT_LIBRARIES}
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
Qt5::Core
|
||||
${TARGET_LIB}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
${TARGET_LIB_GUI}
|
||||
swagger
|
||||
)
|
||||
|
||||
target_link_libraries(inputtestsource Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS inputtestsource DESTINATION lib/plugins/samplesource)
|
||||
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource)
|
||||
|
||||
Reference in New Issue
Block a user