File sdrpp-libdir.patch of Package sdrpp
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -33,6 +33,12 @@ add_library(sdrpp_core SHARED ${SRC} ${BACKEND_SRC})
# Set compiler options
target_compile_options(sdrpp_core PRIVATE ${SDRPP_COMPILER_FLAGS})
+# Set soversion
+set_target_properties(sdrpp_core PROPERTIES VERSION 1.0.4 SOVERSION 1.0.4)
+
+# Set LIB_SUFFIX needed by core.cpp
+target_compile_definitions(sdrpp_core PRIVATE LIB_SUFFIX="${LIB_SUFFIX}")
+
# Set the install prefix
target_compile_definitions(sdrpp_core PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
@@ -167,4 +173,4 @@ set(CORE_FILES ${RUNTIME_OUTPUT_DIRECTORY} PARENT_SCOPE)
# cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
# Install directives
-install(TARGETS sdrpp_core DESTINATION lib)
\ No newline at end of file
+install(TARGETS sdrpp_core DESTINATION lib${LIB_SUFFIX})
--- a/core/src/core.cpp
+++ b/core/src/core.cpp
@@ -32,6 +32,10 @@
#endif
#endif
+#ifndef LIB_SUFFIX
+#define LIB_SUFFIX ""
+#endif
+
namespace core {
ConfigManager configManager;
ModuleManager moduleManager;
@@ -258,7 +262,7 @@ int sdrpp_main(int argc, char* argv[]) {
defConfig["modulesDirectory"] = root + "/modules";
defConfig["resourcesDirectory"] = root + "/res";
#else
- defConfig["modulesDirectory"] = INSTALL_PREFIX "/lib/sdrpp/plugins";
+ defConfig["modulesDirectory"] = INSTALL_PREFIX "/lib" LIB_SUFFIX "/sdrpp/plugins";
defConfig["resourcesDirectory"] = INSTALL_PREFIX "/share/sdrpp";
#endif