From 23498ab24b8e17d0185fda7dc4d3b5805b389b0a Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Wed, 1 May 2019 15:17:27 +0200 Subject: [PATCH] manage "correctly" plugins/pluginssrv folders --- CMakeLists.txt | 12 +- plugins/CMakeLists.txt | 8 ++ plugins/channelrx/chanalyzer/CMakeLists.txt | 2 +- plugins/channelrx/demodam/CMakeLists.txt | 6 +- plugins/channelrx/demodatv/CMakeLists.txt | 2 +- plugins/channelrx/demodbfm/CMakeLists.txt | 6 +- plugins/channelrx/demoddatv/CMakeLists.txt | 2 +- plugins/channelrx/demoddsd/CMakeLists.txt | 6 +- plugins/channelrx/demodfreedv/CMakeLists.txt | 6 +- plugins/channelrx/demodlora/CMakeLists.txt | 2 +- plugins/channelrx/demodnfm/CMakeLists.txt | 6 +- plugins/channelrx/demodssb/CMakeLists.txt | 6 +- plugins/channelrx/demodwfm/CMakeLists.txt | 6 +- plugins/channelrx/remotesink/CMakeLists.txt | 6 +- plugins/channelrx/udpsink/CMakeLists.txt | 6 +- plugins/channeltx/modam/CMakeLists.txt | 6 +- plugins/channeltx/modatv/CMakeLists.txt | 6 +- plugins/channeltx/modfreedv/CMakeLists.txt | 6 +- plugins/channeltx/modnfm/CMakeLists.txt | 6 +- plugins/channeltx/modssb/CMakeLists.txt | 6 +- plugins/channeltx/modwfm/CMakeLists.txt | 6 +- plugins/channeltx/remotesource/CMakeLists.txt | 6 +- plugins/channeltx/udpsource/CMakeLists.txt | 6 +- .../samplesink/bladerf1output/CMakeLists.txt | 6 +- .../samplesink/bladerf2output/CMakeLists.txt | 6 +- plugins/samplesink/filesink/CMakeLists.txt | 6 +- .../samplesink/hackrfoutput/CMakeLists.txt | 6 +- .../samplesink/limesdroutput/CMakeLists.txt | 6 +- .../samplesink/plutosdroutput/CMakeLists.txt | 6 +- .../samplesink/remoteoutput/CMakeLists.txt | 2 +- .../samplesink/soapysdroutput/CMakeLists.txt | 6 +- plugins/samplesink/xtrxoutput/CMakeLists.txt | 6 +- plugins/samplesource/airspy/CMakeLists.txt | 6 +- plugins/samplesource/airspyhf/CMakeLists.txt | 6 +- .../samplesource/bladerf1input/CMakeLists.txt | 6 +- .../samplesource/bladerf2input/CMakeLists.txt | 6 +- plugins/samplesource/fcdpro/CMakeLists.txt | 6 +- .../samplesource/fcdproplus/CMakeLists.txt | 6 +- .../samplesource/filesource/CMakeLists.txt | 6 +- .../samplesource/hackrfinput/CMakeLists.txt | 6 +- .../samplesource/limesdrinput/CMakeLists.txt | 6 +- plugins/samplesource/perseus/CMakeLists.txt | 6 +- .../samplesource/plutosdrinput/CMakeLists.txt | 6 +- .../samplesource/remoteinput/CMakeLists.txt | 6 +- plugins/samplesource/rtlsdr/CMakeLists.txt | 6 +- plugins/samplesource/sdrplay/CMakeLists.txt | 6 +- .../samplesource/soapysdrinput/CMakeLists.txt | 6 +- .../samplesource/testsource/CMakeLists.txt | 6 +- plugins/samplesource/xtrxinput/CMakeLists.txt | 6 +- sdrbase/plugin/pluginmanager.cpp | 128 ++++++++++-------- 50 files changed, 215 insertions(+), 195 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4fd1b37f..1707c0b20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,12 +14,16 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # declare build structures -#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/) -#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/sdrangel) -#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/sdrangel) +# !! change sdrbase/plugin/pluginmanager.cpp too !! +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(BUILD_PLUGINS_DIR ${CMAKE_BINARY_DIR}/lib/plugins) +set(BUILD_PLUGINSSRV_DIR ${CMAKE_BINARY_DIR}/lib/pluginssrv) set(INSTALL_BIN_DIR "bin/") set(INSTALL_LIB_DIR "lib/sdrangel") -# set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/sdrangel") +set(INSTALL_PLUGINS_DIR ${INSTALL_LIB_DIR}/plugins) +set(INSTALL_PLUGINSSRV_DIR ${INSTALL_LIB_DIR}/pluginssrv) # SDRAngel cmake options option(DEBUG_OUTPUT "Print debug messages" OFF) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 1a4f7aade..043e23a8e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -6,6 +6,14 @@ include_directories( ${CMAKE_SOURCE_DIR}/sdrgui ) +if (NOT SERVER_MODE) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BUILD_PLUGINS_DIR}) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BUILD_PLUGINS_DIR}) +else() + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BUILD_PLUGINSSRV_DIR}) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BUILD_PLUGINSSRV_DIR}) +endif() + add_subdirectory(channelrx) add_subdirectory(channeltx) add_subdirectory(samplesource) diff --git a/plugins/channelrx/chanalyzer/CMakeLists.txt b/plugins/channelrx/chanalyzer/CMakeLists.txt index c5bdf1bb0..8925f6c1e 100644 --- a/plugins/channelrx/chanalyzer/CMakeLists.txt +++ b/plugins/channelrx/chanalyzer/CMakeLists.txt @@ -32,4 +32,4 @@ target_link_libraries(chanalyzer sdrgui ) -install(TARGETS chanalyzer DESTINATION ${INSTALL_LIB_DIR}/plugins/channelrx) +install(TARGETS chanalyzer DESTINATION ${INSTALL_PLUGINS_DIR}) diff --git a/plugins/channelrx/demodam/CMakeLists.txt b/plugins/channelrx/demodam/CMakeLists.txt index 4fbf274a3..8ad1dc0c9 100644 --- a/plugins/channelrx/demodam/CMakeLists.txt +++ b/plugins/channelrx/demodam/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodam) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodamsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -55,4 +55,4 @@ target_link_libraries(${TARGET_NAME} ${TARGET_LIB_GUI} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodatv/CMakeLists.txt b/plugins/channelrx/demodatv/CMakeLists.txt index 96f738b6d..74461bd80 100644 --- a/plugins/channelrx/demodatv/CMakeLists.txt +++ b/plugins/channelrx/demodatv/CMakeLists.txt @@ -32,4 +32,4 @@ target_link_libraries(demodatv sdrgui ) -install(TARGETS demodatv DESTINATION ${INSTALL_LIB_DIR}/plugins/channelrx) +install(TARGETS demodatv DESTINATION ${INSTALL_PLUGINS_DIR}) diff --git a/plugins/channelrx/demodbfm/CMakeLists.txt b/plugins/channelrx/demodbfm/CMakeLists.txt index af2321370..accf13c48 100644 --- a/plugins/channelrx/demodbfm/CMakeLists.txt +++ b/plugins/channelrx/demodbfm/CMakeLists.txt @@ -41,12 +41,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodbfm) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodbfmsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -60,4 +60,4 @@ target_link_libraries(${TARGET_NAME} ${TARGET_LIB_GUI} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demoddatv/CMakeLists.txt b/plugins/channelrx/demoddatv/CMakeLists.txt index ce6a7ee7f..258f97de8 100644 --- a/plugins/channelrx/demoddatv/CMakeLists.txt +++ b/plugins/channelrx/demoddatv/CMakeLists.txt @@ -58,4 +58,4 @@ target_link_libraries(demoddatv ${SWRESAMPLE_LIBRARIES} ) -install(TARGETS demoddatv DESTINATION ${INSTALL_LIB_DIR}/plugins/channelrx) +install(TARGETS demoddatv DESTINATION ${INSTALL_PLUGINS_DIR}) diff --git a/plugins/channelrx/demoddsd/CMakeLists.txt b/plugins/channelrx/demoddsd/CMakeLists.txt index d266fc26a..4c7700764 100644 --- a/plugins/channelrx/demoddsd/CMakeLists.txt +++ b/plugins/channelrx/demoddsd/CMakeLists.txt @@ -41,12 +41,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demoddsd) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demoddsdsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -62,4 +62,4 @@ target_link_libraries(${TARGET_NAME} ${LIBMBE_LIBRARY} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodfreedv/CMakeLists.txt b/plugins/channelrx/demodfreedv/CMakeLists.txt index 6e3ece178..c6e7b0843 100644 --- a/plugins/channelrx/demodfreedv/CMakeLists.txt +++ b/plugins/channelrx/demodfreedv/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodfreedv) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodfreedvsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -56,4 +56,4 @@ target_link_libraries(${TARGET_NAME} ${CODEC2_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodlora/CMakeLists.txt b/plugins/channelrx/demodlora/CMakeLists.txt index 2fbb8e3eb..d0691c46a 100644 --- a/plugins/channelrx/demodlora/CMakeLists.txt +++ b/plugins/channelrx/demodlora/CMakeLists.txt @@ -31,4 +31,4 @@ target_link_libraries(demodlora sdrgui ) -install(TARGETS demodlora DESTINATION ${INSTALL_LIB_DIR}/plugins/channelrx) +install(TARGETS demodlora DESTINATION ${INSTALL_PLUGINS_DIR}) diff --git a/plugins/channelrx/demodnfm/CMakeLists.txt b/plugins/channelrx/demodnfm/CMakeLists.txt index 77fa08b08..0a8d36d72 100644 --- a/plugins/channelrx/demodnfm/CMakeLists.txt +++ b/plugins/channelrx/demodnfm/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodnfm) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodnfmsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodssb/CMakeLists.txt b/plugins/channelrx/demodssb/CMakeLists.txt index 93405e601..966dda54a 100644 --- a/plugins/channelrx/demodssb/CMakeLists.txt +++ b/plugins/channelrx/demodssb/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodssb) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodssbsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/demodwfm/CMakeLists.txt b/plugins/channelrx/demodwfm/CMakeLists.txt index bc5e9f964..cecf4bda1 100644 --- a/plugins/channelrx/demodwfm/CMakeLists.txt +++ b/plugins/channelrx/demodwfm/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME demodwfm) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME demodwfmsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -51,4 +51,4 @@ target_link_libraries(${TARGET_NAME} ${TARGET_LIB_GUI} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/remotesink/CMakeLists.txt b/plugins/channelrx/remotesink/CMakeLists.txt index 4b2462e09..f4fae8857 100644 --- a/plugins/channelrx/remotesink/CMakeLists.txt +++ b/plugins/channelrx/remotesink/CMakeLists.txt @@ -44,12 +44,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME remotesink) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME remotesinksrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -65,4 +65,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channelrx/udpsink/CMakeLists.txt b/plugins/channelrx/udpsink/CMakeLists.txt index bf41fc84d..b83bd7b52 100644 --- a/plugins/channelrx/udpsink/CMakeLists.txt +++ b/plugins/channelrx/udpsink/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME udpsink) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME udpsinksrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} ${TARGET_LIB_GUI} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channelrx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modam/CMakeLists.txt b/plugins/channeltx/modam/CMakeLists.txt index e267ca76a..bc3db728c 100644 --- a/plugins/channeltx/modam/CMakeLists.txt +++ b/plugins/channeltx/modam/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modam) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modamsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modatv/CMakeLists.txt b/plugins/channeltx/modatv/CMakeLists.txt index 0c623e547..190b39efd 100644 --- a/plugins/channeltx/modatv/CMakeLists.txt +++ b/plugins/channeltx/modatv/CMakeLists.txt @@ -33,12 +33,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modatv) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modatvsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -54,4 +54,4 @@ target_link_libraries(${TARGET_NAME} ${OpenCV_LIBS} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modfreedv/CMakeLists.txt b/plugins/channeltx/modfreedv/CMakeLists.txt index ff5399435..0af8549c0 100644 --- a/plugins/channeltx/modfreedv/CMakeLists.txt +++ b/plugins/channeltx/modfreedv/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modfreedv) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modfreedvsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -56,4 +56,4 @@ target_link_libraries(${TARGET_NAME} ${CODEC2_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modnfm/CMakeLists.txt b/plugins/channeltx/modnfm/CMakeLists.txt index 658ed00b5..86e9ba726 100644 --- a/plugins/channeltx/modnfm/CMakeLists.txt +++ b/plugins/channeltx/modnfm/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modnfm) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modnfmsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modssb/CMakeLists.txt b/plugins/channeltx/modssb/CMakeLists.txt index 99fc8bfee..0d65eaecc 100644 --- a/plugins/channeltx/modssb/CMakeLists.txt +++ b/plugins/channeltx/modssb/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modssb) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modssbsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/modwfm/CMakeLists.txt b/plugins/channeltx/modwfm/CMakeLists.txt index 8090c370e..c7a361f17 100644 --- a/plugins/channeltx/modwfm/CMakeLists.txt +++ b/plugins/channeltx/modwfm/CMakeLists.txt @@ -32,12 +32,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME modwfm) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME modwfmsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -52,4 +52,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/remotesource/CMakeLists.txt b/plugins/channeltx/remotesource/CMakeLists.txt index daa785c5f..e234ae3a1 100644 --- a/plugins/channeltx/remotesource/CMakeLists.txt +++ b/plugins/channeltx/remotesource/CMakeLists.txt @@ -44,12 +44,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME remotesource) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME remotesourcesrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -66,4 +66,4 @@ target_link_libraries(${TARGET_NAME} ${CM256CC_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/channeltx/udpsource/CMakeLists.txt b/plugins/channeltx/udpsource/CMakeLists.txt index bb91ceb9a..e4eb668f1 100644 --- a/plugins/channeltx/udpsource/CMakeLists.txt +++ b/plugins/channeltx/udpsource/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME udpsource) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME udpsourcesrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -57,4 +57,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/channeltx) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/bladerf1output/CMakeLists.txt b/plugins/samplesink/bladerf1output/CMakeLists.txt index 2b90feba8..497ffb984 100644 --- a/plugins/samplesink/bladerf1output/CMakeLists.txt +++ b/plugins/samplesink/bladerf1output/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputbladerf1) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputbladerf1srv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} bladerf1device ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/bladerf2output/CMakeLists.txt b/plugins/samplesink/bladerf2output/CMakeLists.txt index 455224ec0..37fb4be35 100644 --- a/plugins/samplesink/bladerf2output/CMakeLists.txt +++ b/plugins/samplesink/bladerf2output/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputbladerf2) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputbladerf2srv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} bladerf2device ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/filesink/CMakeLists.txt b/plugins/samplesink/filesink/CMakeLists.txt index 46d763771..f7f6f200c 100644 --- a/plugins/samplesink/filesink/CMakeLists.txt +++ b/plugins/samplesink/filesink/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputfilesink) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputfilesinksrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -54,4 +54,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/hackrfoutput/CMakeLists.txt b/plugins/samplesink/hackrfoutput/CMakeLists.txt index be97eff5c..86a123b6f 100644 --- a/plugins/samplesink/hackrfoutput/CMakeLists.txt +++ b/plugins/samplesink/hackrfoutput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputhackrf) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputhackrfsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} hackrfdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/limesdroutput/CMakeLists.txt b/plugins/samplesink/limesdroutput/CMakeLists.txt index 8263ed4fa..1a08321fd 100644 --- a/plugins/samplesink/limesdroutput/CMakeLists.txt +++ b/plugins/samplesink/limesdroutput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputlimesdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputlimesdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} limesdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/plutosdroutput/CMakeLists.txt b/plugins/samplesink/plutosdroutput/CMakeLists.txt index ac2a03a06..a78b55ee6 100644 --- a/plugins/samplesink/plutosdroutput/CMakeLists.txt +++ b/plugins/samplesink/plutosdroutput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputplutosdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputplutosdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} plutosdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/remoteoutput/CMakeLists.txt b/plugins/samplesink/remoteoutput/CMakeLists.txt index 484d14ed5..2aa4e08b2 100644 --- a/plugins/samplesink/remoteoutput/CMakeLists.txt +++ b/plugins/samplesink/remoteoutput/CMakeLists.txt @@ -69,4 +69,4 @@ target_link_libraries(${TARGET_NAME} ${CM256CC_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) \ No newline at end of file +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/soapysdroutput/CMakeLists.txt b/plugins/samplesink/soapysdroutput/CMakeLists.txt index 861601214..83093c5ad 100644 --- a/plugins/samplesink/soapysdroutput/CMakeLists.txt +++ b/plugins/samplesink/soapysdroutput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputsoapysdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputsoapysdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} soapysdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesink/xtrxoutput/CMakeLists.txt b/plugins/samplesink/xtrxoutput/CMakeLists.txt index 0e8c798a8..7fdb35136 100644 --- a/plugins/samplesink/xtrxoutput/CMakeLists.txt +++ b/plugins/samplesink/xtrxoutput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME outputxtrx) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME outputxtrxsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} xtrxdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesink) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/airspy/CMakeLists.txt b/plugins/samplesource/airspy/CMakeLists.txt index a5e9bce02..54acd9121 100644 --- a/plugins/samplesource/airspy/CMakeLists.txt +++ b/plugins/samplesource/airspy/CMakeLists.txt @@ -35,12 +35,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputairspy) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputairspysrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -56,4 +56,4 @@ target_link_libraries(${TARGET_NAME} ${LIBAIRSPY_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/airspyhf/CMakeLists.txt b/plugins/samplesource/airspyhf/CMakeLists.txt index e00c55096..9f73fede5 100644 --- a/plugins/samplesource/airspyhf/CMakeLists.txt +++ b/plugins/samplesource/airspyhf/CMakeLists.txt @@ -35,12 +35,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputairspyhf) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputairspyhfsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -56,4 +56,4 @@ target_link_libraries(${TARGET_NAME} ${LIBAIRSPYHF_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/bladerf1input/CMakeLists.txt b/plugins/samplesource/bladerf1input/CMakeLists.txt index 92079c28c..bba71fa82 100644 --- a/plugins/samplesource/bladerf1input/CMakeLists.txt +++ b/plugins/samplesource/bladerf1input/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputbladerf1) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputbladerf1srv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} bladerf1device ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/bladerf2input/CMakeLists.txt b/plugins/samplesource/bladerf2input/CMakeLists.txt index 84da6abb6..522a85058 100644 --- a/plugins/samplesource/bladerf2input/CMakeLists.txt +++ b/plugins/samplesource/bladerf2input/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputbladerf2) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputbladerf2srv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} bladerf2device ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/fcdpro/CMakeLists.txt b/plugins/samplesource/fcdpro/CMakeLists.txt index c740c9cba..d1e66ea21 100644 --- a/plugins/samplesource/fcdpro/CMakeLists.txt +++ b/plugins/samplesource/fcdpro/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputfcdpro) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputfcdprosrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} fcdlib ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/fcdproplus/CMakeLists.txt b/plugins/samplesource/fcdproplus/CMakeLists.txt index 928ce28bd..3388ff09e 100644 --- a/plugins/samplesource/fcdproplus/CMakeLists.txt +++ b/plugins/samplesource/fcdproplus/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputfcdproplus) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputfcdproplussrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} fcdlib ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/filesource/CMakeLists.txt b/plugins/samplesource/filesource/CMakeLists.txt index 036d86fa2..a85ac5e11 100644 --- a/plugins/samplesource/filesource/CMakeLists.txt +++ b/plugins/samplesource/filesource/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputfilesource) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputfilesourcesrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -54,4 +54,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/hackrfinput/CMakeLists.txt b/plugins/samplesource/hackrfinput/CMakeLists.txt index 610f990a5..cc7900206 100644 --- a/plugins/samplesource/hackrfinput/CMakeLists.txt +++ b/plugins/samplesource/hackrfinput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputhackrf) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputhackrfsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} hackrfdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/limesdrinput/CMakeLists.txt b/plugins/samplesource/limesdrinput/CMakeLists.txt index 009dfd7aa..357df6de2 100644 --- a/plugins/samplesource/limesdrinput/CMakeLists.txt +++ b/plugins/samplesource/limesdrinput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputlimesdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputlimesdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} limesdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/perseus/CMakeLists.txt b/plugins/samplesource/perseus/CMakeLists.txt index e6bc5904e..85f1346da 100644 --- a/plugins/samplesource/perseus/CMakeLists.txt +++ b/plugins/samplesource/perseus/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputperseus) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputperseussrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} perseusdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/plutosdrinput/CMakeLists.txt b/plugins/samplesource/plutosdrinput/CMakeLists.txt index dab477e66..47d11cf96 100644 --- a/plugins/samplesource/plutosdrinput/CMakeLists.txt +++ b/plugins/samplesource/plutosdrinput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputplutosdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputplutosdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} plutosdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/remoteinput/CMakeLists.txt b/plugins/samplesource/remoteinput/CMakeLists.txt index cbf60c165..8c799e2fc 100644 --- a/plugins/samplesource/remoteinput/CMakeLists.txt +++ b/plugins/samplesource/remoteinput/CMakeLists.txt @@ -46,12 +46,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputremote) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputremotesrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -67,4 +67,4 @@ target_link_libraries(${TARGET_NAME} ${CM256CC_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/rtlsdr/CMakeLists.txt b/plugins/samplesource/rtlsdr/CMakeLists.txt index f363bc69d..73bc7bbd2 100644 --- a/plugins/samplesource/rtlsdr/CMakeLists.txt +++ b/plugins/samplesource/rtlsdr/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputrtlsdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputrtlsdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -55,4 +55,4 @@ target_link_libraries(${TARGET_NAME} ${LIBRTLSDR_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/sdrplay/CMakeLists.txt b/plugins/samplesource/sdrplay/CMakeLists.txt index 806e1f261..3bdbd4b36 100644 --- a/plugins/samplesource/sdrplay/CMakeLists.txt +++ b/plugins/samplesource/sdrplay/CMakeLists.txt @@ -35,12 +35,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputsdrplay) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputsdrplaysrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -56,4 +56,4 @@ target_link_libraries(${TARGET_NAME} ${LIBMIRISDR_LIBRARIES} ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/soapysdrinput/CMakeLists.txt b/plugins/samplesource/soapysdrinput/CMakeLists.txt index 7ba957fd2..1fe65ca79 100644 --- a/plugins/samplesource/soapysdrinput/CMakeLists.txt +++ b/plugins/samplesource/soapysdrinput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputsoapysdr) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputsoapysdrsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} soapysdrdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/testsource/CMakeLists.txt b/plugins/samplesource/testsource/CMakeLists.txt index 7704b7535..98896d673 100644 --- a/plugins/samplesource/testsource/CMakeLists.txt +++ b/plugins/samplesource/testsource/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputtestsource) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputtestsourcesrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -54,4 +54,4 @@ target_link_libraries(${TARGET_NAME} swagger ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/xtrxinput/CMakeLists.txt b/plugins/samplesource/xtrxinput/CMakeLists.txt index 1e47c6b77..ca359b029 100644 --- a/plugins/samplesource/xtrxinput/CMakeLists.txt +++ b/plugins/samplesource/xtrxinput/CMakeLists.txt @@ -36,12 +36,12 @@ if(NOT SERVER_MODE) set(TARGET_NAME inputxtrx) set(TARGET_LIB "Qt5::Widgets") set(TARGET_LIB_GUI "sdrgui") - set(INSTALL_FOLDER "plugins") + set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME inputxtrxsrv) set(TARGET_LIB "") set(TARGET_LIB_GUI "") - set(INSTALL_FOLDER "pluginssrv") + set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() add_library(${TARGET_NAME} SHARED @@ -58,4 +58,4 @@ target_link_libraries(${TARGET_NAME} xtrxdevice ) -install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_LIB_DIR}/${INSTALL_FOLDER}/samplesource) +install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 20e278fc8..6b8b092e5 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -53,7 +53,7 @@ PluginManager::PluginManager(QObject* parent) : PluginManager::~PluginManager() { -// freeAll(); + // freeAll(); } void PluginManager::loadPlugins(const QString& pluginsSubDir) @@ -65,19 +65,38 @@ void PluginManager::loadPlugins(const QString& pluginsSubDir) void PluginManager::loadPluginsPart(const QString& pluginsSubDir) { QString applicationDirPath = QCoreApplication::instance()->applicationDirPath(); - QString applicationLibPath = applicationDirPath + "/../lib/" + pluginsSubDir; + QStringList PluginsPath; + + // NOTE: not the best solution but for now this is + // on make install [PREFIX]/bin and [PREFIX]/lib/sdrangel + PluginsPath << applicationDirPath + "/../lib/sdrangel/" + pluginsSubDir; + // on build + PluginsPath << applicationDirPath + "/lib/" + pluginsSubDir; #ifdef __APPLE__ - applicationLibPath.clear(); - applicationLibPath.append(applicationDirPath + "/../Frameworks/" + pluginsSubDir); + // on SDRAngel.app + PluginsPath << applicationDirPath + "/../Frameworks/" + pluginsSubDir; #endif - QString applicationBuildPath = applicationDirPath + "/" + pluginsSubDir; - qDebug() << "PluginManager::loadPlugins: " << qPrintable(applicationLibPath) << "," << qPrintable(applicationBuildPath); - QDir pluginsLibDir = QDir(applicationLibPath); - QDir pluginsBuildDir = QDir(applicationBuildPath); + // NOTE: exit on the first folder found + bool found = false; + foreach (QString dir, PluginsPath) + { + QDir d(dir); + if (d.isEmpty()) { + qDebug("PluginManager::loadPluginsPart folder %s is empty", qPrintable(dir)); + continue; + } - loadPluginsDir(pluginsLibDir); - loadPluginsDir(pluginsBuildDir); + found = true; + loadPluginsDir(d); + break; + } + + if (!found) + { + qCritical("No plugins found. Exit immediately."); + exit(EXIT_FAILURE); + } } void PluginManager::loadPluginsFinal() @@ -133,83 +152,72 @@ void PluginManager::loadPluginsDir(const QDir& dir) { QDir pluginsDir(dir); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) - { - if (fileName.endsWith(".so") || fileName.endsWith(".dll") || fileName.endsWith(".dylib")) - { - qDebug() << "PluginManager::loadPluginsDir: fileName: " << qPrintable(fileName); + foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + { + if (QLibrary::isLibrary(fileName)) + { + qDebug("PluginManager::loadPluginsDir: fileName: %s", qPrintable(fileName)); - QPluginLoader* loader = new QPluginLoader(pluginsDir.absoluteFilePath(fileName)); - PluginInterface* plugin = qobject_cast(loader->instance()); + QPluginLoader* plugin = new QPluginLoader(pluginsDir.absoluteFilePath(fileName)); + if (!plugin->load()) + { + qWarning("PluginManager::loadPluginsDir: %s", qPrintable(plugin->errorString())); + delete plugin; + continue; + } - if (loader->isLoaded()) - { - qInfo("PluginManager::loadPluginsDir: loaded plugin %s", qPrintable(fileName)); - } - else - { - qWarning() << "PluginManager::loadPluginsDir: " << qPrintable(loader->errorString()); - } + PluginInterface* instance = qobject_cast(plugin->instance()); + if (instance == nullptr) + { + qWarning("PluginManager::loadPluginsDir: Unable to get main instance of plugin: %s", qPrintable(fileName) ); + delete plugin; + continue; + } - if (plugin != 0) - { - m_plugins.append(Plugin(fileName, loader, plugin)); - } - else - { - loader->unload(); - } - - delete loader; // Valgrind memcheck - } - } - - // recursive calls on subdirectories - - foreach (QString dirName, pluginsDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) - { - loadPluginsDir(pluginsDir.absoluteFilePath(dirName)); - } + qInfo("PluginManager::loadPluginsDir: loaded plugin %s", qPrintable(fileName)); + m_plugins.append(Plugin(fileName, plugin, instance)); + } + } } void PluginManager::listTxChannels(QList& list) { - list.clear(); + list.clear(); - for(PluginAPI::ChannelRegistrations::iterator it = m_txChannelRegistrations.begin(); it != m_txChannelRegistrations.end(); ++it) + for(PluginAPI::ChannelRegistrations::iterator it = m_txChannelRegistrations.begin(); it != m_txChannelRegistrations.end(); ++it) { - const PluginDescriptor& pluginDescipror = it->m_plugin->getPluginDescriptor(); - list.append(pluginDescipror.displayedName); + const PluginDescriptor& pluginDescipror = it->m_plugin->getPluginDescriptor(); + list.append(pluginDescipror.displayedName); } } void PluginManager::listRxChannels(QList& list) { - list.clear(); + list.clear(); - for(PluginAPI::ChannelRegistrations::iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it) + for(PluginAPI::ChannelRegistrations::iterator it = m_rxChannelRegistrations.begin(); it != m_rxChannelRegistrations.end(); ++it) { - const PluginDescriptor& pluginDesciptor = it->m_plugin->getPluginDescriptor(); - list.append(pluginDesciptor.displayedName); + const PluginDescriptor& pluginDesciptor = it->m_plugin->getPluginDescriptor(); + list.append(pluginDesciptor.displayedName); } } void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI) { - if (channelPluginIndex < m_rxChannelRegistrations.size()) + if (channelPluginIndex < m_rxChannelRegistrations.size()) { - PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin; - BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI); - pluginInterface->createRxChannelGUI(deviceUISet, rxChannel); + PluginInterface *pluginInterface = m_rxChannelRegistrations[channelPluginIndex].m_plugin; + BasebandSampleSink *rxChannel = pluginInterface->createRxChannelBS(deviceAPI); + pluginInterface->createRxChannelGUI(deviceUISet, rxChannel); } } void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet, DeviceAPI *deviceAPI) { - if (channelPluginIndex < m_txChannelRegistrations.size()) + if (channelPluginIndex < m_txChannelRegistrations.size()) { - PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin; - BasebandSampleSource *txChannel = pluginInterface->createTxChannelBS(deviceAPI); - pluginInterface->createTxChannelGUI(deviceUISet, txChannel); + PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin; + BasebandSampleSource *txChannel = pluginInterface->createTxChannelBS(deviceAPI); + pluginInterface->createTxChannelGUI(deviceUISet, txChannel); } }