aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-11 01:34:37 +0000
committerAlexander Neundorf <neundorf@kde.org>2007-07-11 01:34:37 +0000
commit2d7cbc4447dd922bf8dc070d6f3c8aab796d6893 (patch)
treed9a25cec8823e393da65d652e60391aba40ea2c3
parentcf2cfaf67614854651a5b754d718e2478ea042ad (diff)
downloadextra-cmake-modules-2d7cbc4447dd922bf8dc070d6f3c8aab796d6893.tar.gz
extra-cmake-modules-2d7cbc4447dd922bf8dc070d6f3c8aab796d6893.tar.bz2
-use ${KDE4_KDECONFIG_EXECUTABLE} coming from FindKDE4.cmake instead of just calling kde4-config which might be the wrong one or not in the path at all
-some more qoutes can't hurt for dirs with spaces -use EXECUTE_PROCESS() instead of EXEC_PROGRAM() since this can separate stdout and stderr Alex svn path=/trunk/KDE/kdelibs/; revision=686304
-rw-r--r--modules/FindKDE4Internal.cmake26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 063531fc..3cfcecfd 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -262,28 +262,28 @@ get_filename_component( kde_cmake_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
if (NOT _kdeBootStrapping)
# this file contains all dependencies of all libraries of kdelibs, Alex
- include(${kde_cmake_module_dir}/KDELibsDependencies.cmake)
-
+ include("${kde_cmake_module_dir}/KDELibsDependencies.cmake")
+
# allow searching cmake modules in all given kde install locations (KDEDIRS based)
- exec_program(kde4-config ARGS --path data OUTPUT_VARIABLE _data_DIR)
+ execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
foreach(dir ${_data_DIR})
- set (apath ${dir}/cmake/modules)
- if (EXISTS ${apath})
+ set (apath "${dir}/cmake/modules")
+ if (EXISTS "${apath}")
set (included 0)
- STRING(TOLOWER ${apath} _apath)
+ string(TOLOWER "${apath}" _apath)
# ignore already added pathes, case insensitive
foreach(adir ${CMAKE_MODULE_PATH})
- STRING(TOLOWER ${adir} _adir)
- if (${_adir} STREQUAL ${_apath})
+ string(TOLOWER "${adir}" _adir)
+ if ("${_adir}" STREQUAL "${_apath}")
set (included 1)
- endif (${_adir} STREQUAL ${_apath})
- endforeach(adir)
+ endif ("${_adir}" STREQUAL "${_apath}")
+ endforeach(adir)
if (NOT included)
- message(STATUS "Adding ${dir}/cmake/modules to CMAKE_MODULE_PATH")
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${dir}/cmake/modules)
+ message(STATUS "Adding ${apath} to CMAKE_MODULE_PATH")
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${apath}")
endif (NOT included)
- endif (EXISTS ${apath})
+ endif (EXISTS "${apath}")
endforeach(dir)
endif (NOT _kdeBootStrapping)