diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 67e0ed236..c82f7d10f 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -1,6 +1,5 @@ project(demod) - add_subdirectory(demodam) add_subdirectory(demodbfm) add_subdirectory(demodnfm) diff --git a/plugins/channelrx/freqtracker/CMakeLists.txt b/plugins/channelrx/freqtracker/CMakeLists.txt index 107c4d2b5..be7daf7e3 100644 --- a/plugins/channelrx/freqtracker/CMakeLists.txt +++ b/plugins/channelrx/freqtracker/CMakeLists.txt @@ -1,51 +1,54 @@ project(freqtracker) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - set(freqtracker_SOURCES freqtracker.cpp - freqtrackergui.cpp freqtrackersettings.cpp freqtrackerplugin.cpp ) set(freqtracker_HEADERS freqtracker.h - freqtrackergui.h freqtrackersettings.h freqtrackerplugin.h ) -set(freqtracker_FORMS - freqtrackergui.ui -) - include_directories( - . ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${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(freqtracker_SOURCES + ${freqtracker_SOURCES} + freqtrackergui.cpp -#qt5_wrap_cpp(nfm_HEADERS_MOC ${nfm_HEADERS}) -qt5_wrap_ui(freqtracker_FORMS_HEADERS ${freqtracker_FORMS}) + freqtrackergui.ui + ) + set(freqtracker_HEADERS + ${freqtracker_HEADERS} + freqtrackergui.h + ) -add_library(freqtracker SHARED + set(TARGET_NAME freqtracker) + set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB_GUI "sdrgui") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) +else() + set(TARGET_NAME freqtrackersrv) + set(TARGET_LIB "") + set(TARGET_LIB_GUI "") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) +endif() + +add_library(${TARGET_NAME} SHARED ${freqtracker_SOURCES} - ${freqtracker_HEADERS_MOC} - ${freqtracker_FORMS_HEADERS} ) -target_link_libraries(freqtracker - ${QT_LIBRARIES} +target_link_libraries(${TARGET_NAME} + Qt5::Core + ${TARGET_LIB} sdrbase - sdrgui + ${TARGET_LIB_GUI} ) -target_link_libraries(freqtracker Qt5::Core Qt5::Widgets) - -install(TARGETS freqtracker DESTINATION lib/plugins/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/freqtracker/freqtracker.pro b/plugins/channelrx/freqtracker/freqtracker.pro deleted file mode 100644 index 30d43f8ed..000000000 --- a/plugins/channelrx/freqtracker/freqtracker.pro +++ /dev/null @@ -1,49 +0,0 @@ -#-------------------------------------------------------- -# -# Pro file for Android and Windows builds with Qt Creator -# -#-------------------------------------------------------- - -TEMPLATE = lib -CONFIG += plugin - -QT += core gui widgets multimedia - -TARGET = freqtracker - -DEFINES += USE_SSE2=1 -QMAKE_CXXFLAGS += -msse2 -DEFINES += USE_SSE4_1=1 -QMAKE_CXXFLAGS += -msse4.1 -QMAKE_CXXFLAGS += -std=c++11 - -INCLUDEPATH += $$PWD -INCLUDEPATH += ../../../exports -INCLUDEPATH += ../../../sdrbase -INCLUDEPATH += ../../../sdrgui -INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client - -CONFIG(Release):build_subdir = release -CONFIG(Debug):build_subdir = debug - -SOURCES += freqtracker.cpp\ - freqtrackergui.cpp\ - freqtrackerplugin.cpp\ - freqtrackersettings.cpp - -HEADERS += freqtracker.h\ - freqtrackergui.h\ - freqtrackerplugin.h\ - freqtrackersettings.h - -FORMS += freqtrackergui.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 diff --git a/plugins/channelrx/freqtracker/freqtrackerplugin.h b/plugins/channelrx/freqtracker/freqtrackerplugin.h index e738b5c4f..da6e1ec1a 100644 --- a/plugins/channelrx/freqtracker/freqtrackerplugin.h +++ b/plugins/channelrx/freqtracker/freqtrackerplugin.h @@ -30,7 +30,7 @@ class FreqTrackerPlugin : public QObject, PluginInterface { Q_PLUGIN_METADATA(IID "sdrangel.channel.freqtracker") public: - explicit FreqTrackerPlugin(QObject* parent = NULL); + explicit FreqTrackerPlugin(QObject* parent = nullptr); const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI);