[PATCH] rtl-sdr: add support for lib64 (e.g. Fedora)

Jaroslav Skarvada jskarvad at redhat.com
Mon Apr 8 08:24:28 UTC 2013


From: "Jaroslav Škarvada" <jskarvad at redhat.com>
To: laforge at gnumonks.org
Cc: "Jaroslav Škarvada" <jskarvad at redhat.com>
Sent: Thursday, April 4, 2013 3:36:18 PM
Subject: [PATCH] rtl-sdr: add support for lib64 (e.g. Fedora)

Another possibility is to use the GrPlatform.cmake module.

Signed-off-by: Jaroslav Škarvada <jskarvad at redhat.com>
---
 CMakeLists.txt     | 8 ++++++--
 src/CMakeLists.txt | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3ef31e..b113311 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,10 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
 
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
 
+if(NOT LIB_INSTALL_DIR)
+   set(LIB_INSTALL_DIR lib)
+endif()
+
 ########################################################################
 # Compiler specific setup
 ########################################################################
@@ -130,7 +134,7 @@ ENDIF(CMAKE_CROSSCOMPILING)
 
 set(prefix ${CMAKE_INSTALL_PREFIX})
 set(exec_prefix \${prefix})
-set(libdir \${exec_prefix}/lib)
+set(libdir \${exec_prefix}/${LIB_INSTALL_DIR})
 set(includedir \${prefix}/include)
 
 CONFIGURE_FILE(
@@ -140,5 +144,5 @@ CONFIGURE_FILE(
 
 INSTALL(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
-    DESTINATION lib/pkgconfig
+    DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
 )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6b23395..4b91a4b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -126,7 +126,7 @@ endif()
 # Install built library files & utilities
 ########################################################################
 install(TARGETS ${INSTALL_TARGETS}
-    LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
+    LIBRARY DESTINATION ${LIB_INSTALL_DIR} # .so/.dylib file
+    ARCHIVE DESTINATION ${LIB_INSTALL_DIR} # .lib file
     RUNTIME DESTINATION bin              # .dll file
 )
-- 
1.8.1.4





More information about the osmocom-sdr mailing list