Browse Source

BUG: CMAKE_INSTALL_PREFIX must always have forward slashes.

Brad King 20 years ago
parent
commit
ca4b82d9ed
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Modules/CMakeGenericSystem.cmake

+ 4 - 0
Modules/CMakeGenericSystem.cmake

@@ -49,6 +49,10 @@ ELSE(UNIX)
     "${CMAKE_GENERIC_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_PROGRAM_FILES)
   SET(CMAKE_GENERIC_PROGRAM_FILES)
+
+  # Make sure the prefix uses forward slashes.
+  STRING(REGEX REPLACE "\\\\" "/"
+    CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
 ENDIF(UNIX)
 ENDIF(UNIX)
 
 
 MARK_AS_ADVANCED(
 MARK_AS_ADVANCED(