summaryrefslogtreecommitdiffstats
path: root/Modules/FindSquish.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindSquish.cmake')
-rw-r--r--Modules/FindSquish.cmake8
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index b0b6b2f..48d195a 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