1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 15:51:47 -05:00

Fix plugin names for Qt6 Android

This commit is contained in:
Jon Beniston 2024-10-21 17:09:32 +01:00
parent 427d17351d
commit 907fe25d3c
2 changed files with 14 additions and 5 deletions

View File

@ -41,11 +41,17 @@ else()
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
add_library(${TARGET_NAME} SHARED
${antennatools_SOURCES}
)
if(NOT Qt6_FOUND)
add_library(${TARGET_NAME} ${antennatools_SOURCES})
else()
qt_add_plugin(${TARGET_NAME} CLASS_NAME AntennaToolsPlugin ${antennatools_SOURCES})
endif()
target_link_libraries(${TARGET_NAME}
if(NOT BUILD_SHARED_LIBS)
set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME})
endif()
target_link_libraries(${TARGET_NAME} PRIVATE
Qt::Core
${TARGET_LIB}
sdrbase

View File

@ -81,7 +81,10 @@ void PluginManager::loadPluginsPart(const QString& pluginsSubDir)
// on make install [PREFIX]/bin and [PREFIX]/lib/sdrangel
#if defined(ANDROID)
PluginsPath = QStringList({applicationDirPath});
filter = QStringList({"libsdrangel_" + pluginsSubDir + "_*.so"});
// Qt5 add_library gives libsdrangel_plugins_antennatools.so
// Qt6 qt_add_plugin gives libplugins__sdrangel_plugins_antennatools.so
// Assuming PLUGINS_PREFIX=sdrangel_plugins_
filter = QStringList({"lib*sdrangel_" + pluginsSubDir + "_*.so"});
#else
filter = QStringList({"*"});
PluginsPath << applicationDirPath + "/../" + LIB + "/sdrangel/" + pluginsSubDir;