Revision: 65559
          http://sourceforge.net/p/brlcad/code/65559
Author:   starseeker
Date:     2015-07-10 20:20:14 +0000 (Fri, 10 Jul 2015)
Log Message:
-----------
Go with NEW on 0042, while keeping the CMAKE_INSTALL_NAME_DIR setting for older 
CMake.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/misc/CMake/RPath_Setup.cmake

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2015-07-10 20:13:35 UTC (rev 65558)
+++ brlcad/trunk/CMakeLists.txt 2015-07-10 20:20:14 UTC (rev 65559)
@@ -130,7 +130,7 @@
 
   if ("${CMAKE_VERSION}" VERSION_GREATER 2.99)
     CMAKE_POLICY(SET CMP0026 OLD)
-    CMAKE_POLICY(SET CMP0042 OLD)
+    CMAKE_POLICY(SET CMP0042 NEW)
   endif ("${CMAKE_VERSION}" VERSION_GREATER 2.99)
 
   if ("${CMAKE_VERSION}" VERSION_GREATER 3.0.9)

Modified: brlcad/trunk/misc/CMake/RPath_Setup.cmake
===================================================================
--- brlcad/trunk/misc/CMake/RPath_Setup.cmake   2015-07-10 20:13:35 UTC (rev 
65558)
+++ brlcad/trunk/misc/CMake/RPath_Setup.cmake   2015-07-10 20:20:14 UTC (rev 
65559)
@@ -47,9 +47,12 @@
 if (NOT APPLE)
   set(CMAKE_INSTALL_RPATH 
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}:\$ORIGIN/../${LIB_DIR}")
 endif(NOT APPLE)
-# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH
+# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH for CMake < 3.0
 # 
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INSTALL_NAME_DIR
-set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
+# http://www.cmake.org/cmake/help/v3.2/policy/CMP0042.html
+if ("${CMAKE_VERSION}" VERSION_LESS 3.0)
+  set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
+endif ("${CMAKE_VERSION}" VERSION_LESS 3.0)
 
 # add the automatically determined parts of the RPATH which point to
 # directories outside the build tree to the install RPATH

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to