commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/06: cmake: on APPLE only, add defaults f


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/06: cmake: on APPLE only, add defaults for rpath and install name info for libraries
Date: Fri, 29 Aug 2014 17:21:25 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 0c10990ef22281b5e19ac7fcb21010f52b65e16e
Author: Michael Dickens <address@hidden>
Date:   Thu Aug 28 13:02:57 2014 -0400

    cmake: on APPLE only, add defaults for rpath and install name info for 
libraries
---
 CMakeLists.txt      | 20 ++++++++++++++++++++
 volk/CMakeLists.txt | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 131be69..733e0c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,6 +190,26 @@ file(TO_NATIVE_PATH "${SYSCONFDIR}"                     
SYSCONFDIR)
 file(TO_NATIVE_PATH "${GR_PREFSDIR}"                    GR_PREFSDIR)
 
 ########################################################################
+# On Apple only, set install name and use rpath correctly, if not already set
+########################################################################
+if(APPLE)
+    if(NOT CMAKE_INSTALL_NAME_DIR)
+        set(CMAKE_INSTALL_NAME_DIR
+            ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+            PATH "Library Install Name Destination Directory" FORCE)
+    endif(NOT CMAKE_INSTALL_NAME_DIR)
+    if(NOT CMAKE_INSTALL_RPATH)
+        set(CMAKE_INSTALL_RPATH
+            ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+            PATH "Library Install RPath" FORCE)
+    endif(NOT CMAKE_INSTALL_RPATH)
+    if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+        set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
+            BOOL "Do Build Using Library Install RPath" FORCE)
+    endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+endif(APPLE)
+
+########################################################################
 # Create uninstall target
 ########################################################################
 configure_file(
diff --git a/volk/CMakeLists.txt b/volk/CMakeLists.txt
index efde601..2bf70bb 100644
--- a/volk/CMakeLists.txt
+++ b/volk/CMakeLists.txt
@@ -147,6 +147,26 @@ install(
 )
 
 ########################################################################
+# On Apple only, set install name and use rpath correctly, if not already set
+########################################################################
+if(APPLE)
+    if(NOT CMAKE_INSTALL_NAME_DIR)
+        set(CMAKE_INSTALL_NAME_DIR
+            ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+            PATH "Library Install Name Destination Directory" FORCE)
+    endif(NOT CMAKE_INSTALL_NAME_DIR)
+    if(NOT CMAKE_INSTALL_RPATH)
+        set(CMAKE_INSTALL_RPATH
+            ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+            PATH "Library Install RPath" FORCE)
+    endif(NOT CMAKE_INSTALL_RPATH)
+    if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+        set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
+            BOOL "Do Build Using Library Install RPath" FORCE)
+    endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+endif(APPLE)
+
+########################################################################
 # Setup the library
 ########################################################################
 add_subdirectory(lib)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]