1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

localsink and localinput to new cmake format

This commit is contained in:
Davide Gerhard 2019-05-03 20:13:39 +02:00
parent 68d49f66e4
commit d52f260d11
No known key found for this signature in database
GPG Key ID: 7CBEFA144857DC97
4 changed files with 90 additions and 195 deletions

View File

@ -1,10 +1,7 @@
project(localsink) project(localsink)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(localsink_SOURCES set(localsink_SOURCES
localsink.cpp localsink.cpp
localsinkgui.cpp
localsinksettings.cpp localsinksettings.cpp
localsinkthread.cpp localsinkthread.cpp
localsinkplugin.cpp localsinkplugin.cpp
@ -12,42 +9,51 @@ set(localsink_SOURCES
set(localsink_HEADERS set(localsink_HEADERS
localsink.h localsink.h
localsinkgui.h
localsinksettings.h localsinksettings.h
localsinkthread.h localsinkthread.h
localsinkplugin.h localsinkplugin.h
) )
set(localsink_FORMS include_directories(
localsinkgui.ui
)
#include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_SHARED)
qt5_wrap_ui(localsink_FORMS_HEADERS ${localsink_FORMS})
add_library(localsink SHARED
${localsink_SOURCES}
${localsink_HEADERS_MOC}
${localsink_FORMS_HEADERS}
)
target_include_directories(localsink PUBLIC
.
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
) ${Boost_INCLUDE_DIR}
)
target_link_libraries(localsink if(NOT SERVER_MODE)
${QT_LIBRARIES} set(localsink_SOURCES
${localsink_SOURCES}
localsinkgui.cpp
localsinkgui.ui
)
set(localsink_HEADERS
${localsink_HEADERS}
localsinkgui.h
)
set(TARGET_NAME localsink)
set(TARGET_LIB "Qt5::Widgets")
set(TARGET_LIB_GUI "sdrgui")
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
else()
set(TARGET_NAME localsinksrv)
set(TARGET_LIB "")
set(TARGET_LIB_GUI "")
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
add_library(${TARGET_NAME} SHARED
${localsink_SOURCES}
)
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}
sdrbase sdrbase
sdrgui ${TARGET_LIB_GUI}
${CM256CC_LIBRARIES}
swagger swagger
) )
target_link_libraries(localsink Qt5::Core Qt5::Widgets) install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
install(TARGETS localsink DESTINATION lib/plugins/channelrx)

View File

@ -1,60 +0,0 @@
#--------------------------------------------------------
#
# Pro file for Windows builds with Qt Creator
#
#--------------------------------------------------------
TEMPLATE = lib
CONFIG += plugin
QT += core gui widgets multimedia network opengl
TARGET = localsink
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
macx:INCLUDEPATH += /opt/local/include
DEFINES += USE_SSE2=1
QMAKE_CXXFLAGS += -msse2
DEFINES += USE_SSSE3=1
QMAKE_CXXFLAGS += -mssse3
DEFINES += USE_SSE4_1=1
QMAKE_CXXFLAGS += -msse4.1
QMAKE_CXXFLAGS += -std=c++11
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0"
SOURCES += localsink.cpp\
localsinkgui.cpp\
localsinksettings.cpp\
localsinkplugin.cpp\
localsinkthread.cpp
HEADERS += localsink.h\
localsinkgui.h\
localsinksettings.h\
localsinkplugin.h\
localsinkthread.h
FORMS += localsinkgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
}
RESOURCES = ../../../sdrgui/resources/res.qrc
CONFIG(MINGW32):DEFINES += USE_INTERNAL_TIMER=1

View File

@ -1,50 +1,57 @@
project(localinput) project(localinput)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(localinput_SOURCES set(localinput_SOURCES
localinputgui.cpp
localinput.cpp localinput.cpp
localinputsettings.cpp localinputsettings.cpp
localinputplugin.cpp localinputplugin.cpp
) )
set(localinput_HEADERS set(localinput_HEADERS
localinputgui.h
localinput.h localinput.h
localinputsettings.h localinputsettings.h
localinputplugin.h localinputplugin.h
) )
set(localinput_FORMS
localinputgui.ui
)
add_definitions(${QT_DEFINITIONS}) include_directories(
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_SHARED)
qt5_wrap_ui(localinput_FORMS_HEADERS ${localinput_FORMS})
add_library(inputlocal SHARED
${localinput_SOURCES}
${localinput_HEADERS_MOC}
${localinput_FORMS_HEADERS}
)
target_include_directories(inputlocal PUBLIC
.
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
) )
target_link_libraries(inputlocal if(NOT SERVER_MODE)
${QT_LIBRARIES} set(localinput_SOURCES
${localinput_SOURCES}
localinputgui.cpp
localinputgui.ui
)
set(localinput_HEADERS
${localinput_HEADERS}
localinputgui.h
)
set(TARGET_NAME inputlocal)
set(TARGET_LIB "Qt5::Widgets")
set(TARGET_LIB_GUI "sdrgui")
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
else()
set(TARGET_NAME inputlocalsrv)
set(TARGET_LIB "")
set(TARGET_LIB_GUI "")
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
add_library(${TARGET_NAME} SHARED
${localinput_SOURCES}
)
target_link_libraries(${TARGET_NAME}
Qt5::Core
${TARGET_LIB}
sdrbase sdrbase
sdrgui ${TARGET_LIB_GUI}
swagger swagger
${CM256CC_LIBRARIES}
) )
target_link_libraries(inputlocal Qt5::Core Qt5::Widgets) install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
install(TARGETS inputlocal DESTINATION lib/plugins/samplesource)

View File

@ -1,58 +0,0 @@
#--------------------------------------------------------
#
# Pro file for Android and Windows builds with Qt Creator
#
#--------------------------------------------------------
TEMPLATE = lib
CONFIG += plugin
QT += core gui widgets multimedia network opengl
TARGET = inputlocal
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
macx:INCLUDEPATH += /opt/local/include
DEFINES += USE_SSE2=1
QMAKE_CXXFLAGS += -msse2
DEFINES += USE_SSSE3=1
QMAKE_CXXFLAGS += -mssse3
DEFINES += USE_SSE4_1=1
QMAKE_CXXFLAGS += -msse4.1
QMAKE_CXXFLAGS += -std=c++11
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0"
SOURCES += localinputgui.cpp\
localinput.cpp\
localinputsettings.cpp\
localinputplugin.cpp
HEADERS += localinputgui.h\
localinput.h\
localinputsettings.h\
localinputplugin.h
FORMS += localinputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
}
RESOURCES = ../../../sdrgui/resources/res.qrc
CONFIG(MINGW32):DEFINES += USE_INTERNAL_TIMER=1