aboutsummaryrefslogtreecommitdiff
path: root/kde-modules
diff options
context:
space:
mode:
authorAurélien Gâteau <agateau@kde.org>2014-05-14 15:08:22 +0200
committerAurélien Gâteau <agateau@kde.org>2014-05-14 16:50:44 +0200
commitcb30eb91b8a0265c620e155b4b2acf916cab20a6 (patch)
tree3dfba447b6bdf8b995f05839d2e7ccd9bfea2a39 /kde-modules
parentb02aac922797f9dbaaf35de54de61a1167984e51 (diff)
downloadextra-cmake-modules-cb30eb91b8a0265c620e155b4b2acf916cab20a6.tar.gz
extra-cmake-modules-cb30eb91b8a0265c620e155b4b2acf916cab20a6.tar.bz2
Do not fail if vars like CMAKE_INSTALL_LIBDIR are defined as normal vars
REVIEW: 118127
Diffstat (limited to 'kde-modules')
-rw-r--r--kde-modules/KDEInstallDirs.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
index 6102d9e5..061e542b 100644
--- a/kde-modules/KDEInstallDirs.cmake
+++ b/kde-modules/KDEInstallDirs.cmake
@@ -247,12 +247,15 @@ macro(_define_relative varname parent subdir docstring)
CACHE PATH "${docstring} (${_docpath})")
set(CMAKE_INSTALL_${varname} "${_realpath}")
else()
- # make sure the docs are still set if it was passed on the command line
- set_property(CACHE CMAKE_INSTALL_${varname}
- PROPERTY HELPSTRING "${docstring} (${_docpath})")
- # make sure the type is correct if it was passed on the command line
- set_property(CACHE CMAKE_INSTALL_${varname}
- PROPERTY TYPE PATH)
+ get_property(_iscached CACHE CMAKE_INSTALL_${varname} PROPERTY VALUE SET)
+ if (_iscached)
+ # make sure the docs are still set if it was passed on the command line
+ set_property(CACHE CMAKE_INSTALL_${varname}
+ PROPERTY HELPSTRING "${docstring} (${_docpath})")
+ # make sure the type is correct if it was passed on the command line
+ set_property(CACHE CMAKE_INSTALL_${varname}
+ PROPERTY TYPE PATH)
+ endif()
endif()
if(_oldstylename)