[cmake-commits] king committed CMakeGenericSystem.cmake 1.12 1.13

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Oct 16 13:58:22 EDT 2006


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

Modified Files:
	CMakeGenericSystem.cmake 
Log Message:
ENH: Allow user project code to distinguish between an install prefix set on the command line and one set by CMake as a default.  This is useful for changing the default prefix while still allowing the user to override it.


Index: CMakeGenericSystem.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeGenericSystem.cmake,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- CMakeGenericSystem.cmake	25 May 2006 18:16:28 -0000	1.12
+++ CMakeGenericSystem.cmake	16 Oct 2006 17:58:17 -0000	1.13
@@ -41,6 +41,14 @@
   MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
 ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
 
+# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
+# was initialized by the block below.  This is useful for user
+# projects to change the default prefix while still allowing the
+# command line to override it.
+IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
+ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+
 # Choose a default install prefix for this platform.
 IF(UNIX)
   SET(CMAKE_INSTALL_PREFIX "/usr/local"



More information about the Cmake-commits mailing list