From 2d7cbc4447dd922bf8dc070d6f3c8aab796d6893 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 11 Jul 2007 01:34:37 +0000 Subject: -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 --- modules/FindKDE4Internal.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules') 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) -- cgit v1.2.1