diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-03-16 20:53:11 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-03-16 20:53:11 (GMT) |
commit | 779851f213b82869e975c0189030d5a966b6a60d (patch) | |
tree | b7fada0f7ae5bd58f5e3916683d308dddc302afe /Modules | |
parent | 520b792f6f8b65e6c387d4f9439898c8e81b49c8 (diff) | |
download | CMake-779851f213b82869e975c0189030d5a966b6a60d.zip CMake-779851f213b82869e975c0189030d5a966b6a60d.tar.gz CMake-779851f213b82869e975c0189030d5a966b6a60d.tar.bz2 |
ENH: after searching for kde-config in the special dirs, search again in the
standard dirs
BUG: handle paths on windows correctly
Alex
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindKDE4.cmake | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake index 8535f2c..a40f9cd 100644 --- a/Modules/FindKDE4.cmake +++ b/Modules/FindKDE4.cmake @@ -21,14 +21,26 @@ FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config /usr/bin /usr/local/bin NO_SYSTEM_PATH + NO_CMAKE_SYSTEM_PATH ) + +IF (NOT KDE4_KDECONFIG_EXECUTABLE) + FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config ) +ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE) + IF (KDE4_KDECONFIG_EXECUTABLE) # then ask kde-config for the kde data dirs EXEC_PROGRAM(${KDE4_KDECONFIG_EXECUTABLE} ARGS --path data OUTPUT_VARIABLE _data_DIR ) - # replace the ":" with ";" so that it becomes a valid cmake list - STRING(REGEX REPLACE ":" ";" _data_DIR "${_data_DIR}") + + IF(WIN32) + # cmake can't handle paths with '\' correct :-( + STRING(REGEX REPLACE "\\\\" "/" _data_DIR "${_data_DIR}") + ELSE(WIN32) + # replace the ":" with ";" so that it becomes a valid cmake list + STRING(REGEX REPLACE ":" ";" _data_DIR "${_data_DIR}") + ENDIF(WIN32) # then check the data dirs for FindKDE4Internal.cmake FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake ${_data_DIR}) |