[cmake-commits] alex committed UnixPaths.cmake 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jul 16 09:08:47 EDT 2007


Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv18382

Modified Files:
	UnixPaths.cmake 
Log Message:

ENH: also add the install base dir of the running cmake to the search
directories for the FIND_XXX() commands, for the case that somebody has its
own install tree

Alex


Index: UnixPaths.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/UnixPaths.cmake,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- UnixPaths.cmake	27 Jun 2007 16:07:34 -0000	1.8
+++ UnixPaths.cmake	16 Jul 2007 13:08:45 -0000	1.9
@@ -1,3 +1,8 @@
+# also add the install directory of the running cmake to the search directories
+# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
+GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
+GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
+
 SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
   # Standard
   /include /usr/include /usr/local/include
@@ -11,6 +16,7 @@
   # Other
   /opt/local/include /usr/pkg/include
   /opt/csw/include /opt/include
+  "${_CMAKE_INSTALL_DIR}/include"
   )
 
 SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
@@ -26,10 +32,12 @@
   # Other
   /opt/local/lib /usr/pkg/lib
   /opt/csw/lib /opt/lib
+  "${_CMAKE_INSTALL_DIR}/lib"
   )
 
 SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
   /bin /usr/bin /usr/local/bin /usr/pkg/bin /sbin
+  "${_CMAKE_INSTALL_DIR}/bin"
   )
 
 SET(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES



More information about the Cmake-commits mailing list