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.
This commit is contained in:
parent
808ce048eb
commit
5fddc58427
|
@ -35,16 +35,19 @@ IF(UNIX)
|
||||||
SET(CMAKE_INSTALL_PREFIX "/usr/local"
|
SET(CMAKE_INSTALL_PREFIX "/usr/local"
|
||||||
CACHE PATH "Install path prefix, prepended onto install directories.")
|
CACHE PATH "Install path prefix, prepended onto install directories.")
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
IF("$ENV{SystemDrive}" MATCHES "^$")
|
IF("$ENV{ProgramFiles}" MATCHES "^$")
|
||||||
SET(CMAKE_GENERIC_SYSTEM_DRIVE "C:")
|
IF("$ENV{SystemDrive}" MATCHES "^$")
|
||||||
ELSE("$ENV{SystemDrive}" MATCHES "^$")
|
SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
|
||||||
SET(CMAKE_GENERIC_SYSTEM_DRIVE "$ENV{SystemDrive}")
|
ELSE("$ENV{SystemDrive}" MATCHES "^$")
|
||||||
ENDIF("$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
|
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.")
|
CACHE PATH "Install path prefix, prepended onto install directories.")
|
||||||
SET(CMAKE_GENERIC_SYSTEM_DRIVE)
|
SET(CMAKE_GENERIC_PROGRAM_FILES)
|
||||||
MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
|
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
|
|
Loading…
Reference in New Issue