diff options
author | Kevin Ottens <ervin@kde.org> | 2009-09-03 18:36:50 +0000 |
---|---|---|
committer | Kevin Ottens <ervin@kde.org> | 2009-09-03 18:36:50 +0000 |
commit | 47ed93f05b28205a472977e283efa1e61c8ae263 (patch) | |
tree | c3fd89e3fcd33da6ce6b173f39b17af566415222 | |
parent | 60320ce756a0bcdf2f86549c43b308fd8f1daae2 (diff) | |
download | extra-cmake-modules-47ed93f05b28205a472977e283efa1e61c8ae263.tar.gz extra-cmake-modules-47ed93f05b28205a472977e283efa1e61c8ae263.tar.bz2 |
Simplify using IS_ABSOLUTE.
Thanks for the tip aleXXX.
CCMAIL: neundorf@kde.og
svn path=/trunk/KDE/kdelibs/; revision=1019492
-rw-r--r-- | modules/KDE4Macros.cmake | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index e494c0ae..288b33c6 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -73,20 +73,14 @@ macro (KDE4_ADD_KCFG_FILES _sources ) # Get relative path get_filename_component(_rel_PATH ${_current_FILE} PATH) - # Resolve the relative path from the current source dir - if(NOT ${_rel_PATH} STREQUAL "") - get_filename_component(_abs_PATH2 ${CMAKE_CURRENT_SOURCE_DIR}/${_rel_PATH} ABSOLUTE) - endif(NOT ${_rel_PATH} STREQUAL "") - - # If the resolved relative path is not equal to the absolute one, - # that means that we got an absolute path in the first place - if(NOT "${_abs_PATH2}" STREQUAL "${_abs_PATH}") + if (IS_ABSOLUTE ${_rel_PATH}) + # We got an absolute path set(_rel_PATH "") - endif(NOT "${_abs_PATH2}" STREQUAL "${_abs_PATH}") + endif (IS_ABSOLUTE ${_rel_PATH}) endif (_kcfg_relativepath) get_filename_component(_basename ${_tmp_FILE} NAME_WE) - # If we had a real relative path and we're asked to use it, then change the basename accordingly + # If we had a relative path and we're asked to use it, then change the basename accordingly if(NOT ${_rel_PATH} STREQUAL "") set(_basename ${_rel_PATH}/${_basename}) endif(NOT ${_rel_PATH} STREQUAL "") |