Description: Make common code shared library private
 Common code for the drivers is collected in a shared library. This is
 installed in the standard lib location, although it is not used
 outside these modules.
 .
 Install it into the SoapySDR directory instead and pull off the right
 RPATH shenanigans to make it work. The soname is changed to be based on
 the libsoapysdr ABI version to match.
Author: Andreas Bombe <aeb@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: git/CMakeLists.txt
===================================================================
--- git.orig/CMakeLists.txt	2019-09-23 03:40:15.636633813 +0200
+++ git/CMakeLists.txt	2019-09-23 03:40:48.176662108 +0200
@@ -37,7 +37,7 @@
 
 # Set the version information here
 set(VERSION "0.2.4")
-set(SOVERSION 0)
+set(SOVERSION 0.8)
 
 find_package(SoapySDR NO_MODULE REQUIRED)
 
@@ -218,11 +218,14 @@
 add_library(SoapyOsmoSDR SHARED ${osmosdr_srcs})
 target_link_libraries(SoapyOsmoSDR ${Boost_LIBRARIES} ${osmo_libraries})
 set_target_properties(SoapyOsmoSDR PROPERTIES DEFINE_SYMBOL "gnuradio_osmosdr_EXPORTS")
-set_target_properties(SoapyOsmoSDR PROPERTIES VERSION ${VERSION})
 set_target_properties(SoapyOsmoSDR PROPERTIES SOVERSION ${SOVERSION})
+set(CMAKE_SKIP_BUILD_RPATH FALSE)
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INSTALL_RPATH "/usr/lib${LIB_SUFFIX}/SoapySDR")
 
 install(TARGETS SoapyOsmoSDR
-    LIBRARY DESTINATION lib${LIB_SUFFIX} # .so file
+    LIBRARY DESTINATION lib${LIB_SUFFIX}/SoapySDR # .so file
     ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     RUNTIME DESTINATION bin              # .dll file
 )
