summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeGenericSystem.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-29 19:49:51 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-29 19:49:51 (GMT)
commit5fddc584272936c5eba9e244061ae0968a708e97 (patch)
tree3a9d7d3dcd9886f946d2f974761d8c45f8b504f6 /Modules/CMakeGenericSystem.cmake
parent808ce048ebf29b03c816396d13396649b08ad298 (diff)
downloadCMake-5fddc584272936c5eba9e244061ae0968a708e97.zip
CMake-5fddc584272936c5eba9e244061ae0968a708e97.tar.gz
CMake-5fddc584272936c5eba9e244061ae0968a708e97.tar.bz2
ENH: Picking better default for CMAKE_INSTALL_PREFIX on Windows by using ProgramFiles environment variable. Now that install actually works on Windows I'm making this entry non-advanced also.
Diffstat (limited to 'Modules/CMakeGenericSystem.cmake')
-rw-r--r--Modules/CMakeGenericSystem.cmake19
1 files changed, 11 insertions, 8 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index b3a8821..c8bc457 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -35,16 +35,19 @@ IF(UNIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local"
CACHE PATH "Install path prefix, prepended onto install directories.")
ELSE(UNIX)
- IF("$ENV{SystemDrive}" MATCHES "^$")
- SET(CMAKE_GENERIC_SYSTEM_DRIVE "C:")
- ELSE("$ENV{SystemDrive}" MATCHES "^$")
- SET(CMAKE_GENERIC_SYSTEM_DRIVE "$ENV{SystemDrive}")
- ENDIF("$ENV{SystemDrive}" MATCHES "^$")
+ IF("$ENV{ProgramFiles}" MATCHES "^$")
+ IF("$ENV{SystemDrive}" MATCHES "^$")
+ SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
+ ELSE("$ENV{SystemDrive}" MATCHES "^$")
+ SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
+ ENDIF("$ENV{SystemDrive}" MATCHES "^$")
+ ELSE("$ENV{ProgramFiles}" MATCHES "^$")
+ SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
+ ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
SET(CMAKE_INSTALL_PREFIX
- "${CMAKE_GENERIC_SYSTEM_DRIVE}/Program Files/${PROJECT_NAME}"
+ "${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
CACHE PATH "Install path prefix, prepended onto install directories.")
- SET(CMAKE_GENERIC_SYSTEM_DRIVE)
- MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_GENERIC_PROGRAM_FILES)
ENDIF(UNIX)
MARK_AS_ADVANCED(