summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-06-21 11:54:14 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2012-06-21 11:54:14 -0400
commit3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73 (patch)
tree7d481dd4d60d7bb5a1b06a4e840fdbd33d1032ef /Modules
parent934f553f855783ad5c23f1161d4fdcf198f78b8e (diff)
parent3505e684664d4d48bedd5f4d9ed6dd496691a914 (diff)
downloadcmake-3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73.tar.gz
Merge topic 'use-string-to-cmake-path'
3505e68 replace open coded versions of file(TO_CMAKE_PATH)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindFLTK.cmake8
-rw-r--r--Modules/FindFLTK2.cmake8
-rw-r--r--Modules/FindSquish.cmake8
3 files changed, 6 insertions, 18 deletions
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 547330119c..bdea95bdc4 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -79,18 +79,14 @@ SET(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the
# Search only if the location is not already known.
IF(NOT FLTK_DIR)
# Get the system search path as a list.
- IF(UNIX)
- STRING(REGEX MATCHALL "[^:]+" FLTK_DIR_SEARCH1 "$ENV{PATH}")
- ELSE(UNIX)
- STRING(REGEX REPLACE "\\\\" "/" FLTK_DIR_SEARCH1 "$ENV{PATH}")
- ENDIF(UNIX)
- STRING(REGEX REPLACE "/;" ";" FLTK_DIR_SEARCH2 ${FLTK_DIR_SEARCH1})
+ FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(FLTK_DIR_SEARCH "")
FOREACH(dir ${FLTK_DIR_SEARCH2})
SET(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
+ STRING(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}")
#
# Look for an installation or build tree.
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index b475a64c0c..9164745796 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -59,18 +59,14 @@ SET(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either th
# Search only if the location is not already known.
IF(NOT FLTK2_DIR)
# Get the system search path as a list.
- IF(UNIX)
- STRING(REGEX MATCHALL "[^:]+" FLTK2_DIR_SEARCH1 "$ENV{PATH}")
- ELSE(UNIX)
- STRING(REGEX REPLACE "\\\\" "/" FLTK2_DIR_SEARCH1 "$ENV{PATH}")
- ENDIF(UNIX)
- STRING(REGEX REPLACE "/;" ";" FLTK2_DIR_SEARCH2 ${FLTK2_DIR_SEARCH1})
+ FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK2_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(FLTK2_DIR_SEARCH "")
FOREACH(dir ${FLTK2_DIR_SEARCH2})
SET(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
+ STRING(REPLACE "//" "/" FLTK2_DIR_SEARCH "${FLTK2_DIR_SEARCH}")
#
# Look for an installation or build tree.
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index b0b6b2f477..48d195a1e1 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -43,18 +43,14 @@ SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
# Search only if the location is not already known.
IF(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
- IF(UNIX)
- STRING(REGEX MATCHALL "[^:]+" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
- ELSE(UNIX)
- STRING(REGEX REPLACE "\\\\" "/" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
- ENDIF(UNIX)
- STRING(REGEX REPLACE "/;" ";" SQUISH_INSTALL_DIR_SEARCH2 ${SQUISH_INSTALL_DIR_SEARCH1})
+ FILE(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(SQUISH_INSTALL_DIR_SEARCH "")
FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
+ STRING(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
# Look for an installation
FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner