Commit 5fddc584 authored by Brad King's avatar Brad King 💬
Browse files

ENH: Picking better default for CMAKE_INSTALL_PREFIX on Windows by using...

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.
parent 808ce048
......@@ -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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment