diff options
author | David Cole <david.cole@kitware.com> | 2012-06-21 15:54:14 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-06-21 15:54:14 (GMT) |
commit | 3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73 (patch) | |
tree | 7d481dd4d60d7bb5a1b06a4e840fdbd33d1032ef /Modules/FindFLTK2.cmake | |
parent | 934f553f855783ad5c23f1161d4fdcf198f78b8e (diff) | |
parent | 3505e684664d4d48bedd5f4d9ed6dd496691a914 (diff) | |
download | CMake-3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73.zip CMake-3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73.tar.gz CMake-3948cb4fe461dfe2a6e3f3cd80f51fda392b4f73.tar.bz2 |
Merge topic 'use-string-to-cmake-path'
3505e68 replace open coded versions of file(TO_CMAKE_PATH)
Diffstat (limited to 'Modules/FindFLTK2.cmake')
-rw-r--r-- | Modules/FindFLTK2.cmake | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index b475a64..9164745 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. |