diff options
author | David Faure <faure@kde.org> | 2021-11-23 17:31:42 +0100 |
---|---|---|
committer | David Faure <faure@kde.org> | 2021-11-23 17:31:42 +0100 |
commit | 9f519983d628c7c2a68ee1a8dc7a1cbb83c8f535 (patch) | |
tree | 0ba708cd158ceff0e712d89fd6fb3cfc392154fb /kde-modules/KDEInstallDirsCommon.cmake | |
parent | 72b8ed99fd49d64465b808d45f1d001a88db31be (diff) | |
download | extra-cmake-modules-9f519983d628c7c2a68ee1a8dc7a1cbb83c8f535.tar.gz extra-cmake-modules-9f519983d628c7c2a68ee1a8dc7a1cbb83c8f535.tar.bz2 |
KDEInstallDirs5: set up KSERVICESDIR alias for KSERVICES5DIR
and use only KSERVICESDIR in KDEInstallDirs6.
Diffstat (limited to 'kde-modules/KDEInstallDirsCommon.cmake')
-rw-r--r-- | kde-modules/KDEInstallDirsCommon.cmake | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/kde-modules/KDEInstallDirsCommon.cmake b/kde-modules/KDEInstallDirsCommon.cmake index f0177c05..a5027008 100644 --- a/kde-modules/KDEInstallDirsCommon.cmake +++ b/kde-modules/KDEInstallDirsCommon.cmake @@ -76,11 +76,16 @@ set(_gnu_install_dirs_vars # relative to KDE_INSTALL_${parent}: no leading / # docstring: documentation about the variable (not including the default value) # oldstylename (optional): the old-style name of the variable +# alias (optional): alias for the variable (e.g. without '5' in the name) macro(_define_relative varname parent subdir docstring) set(_oldstylename) if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED AND ${ARGC} GREATER 4) set(_oldstylename "${ARGV4}") endif() + set(_aliasname) + if(${ARGC} GREATER 5) + set(_aliasname "${ARGV5}") + endif() set(_cmakename) if(NOT KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES) list(FIND _gnu_install_dirs_vars "${varname}" _list_offset) @@ -132,6 +137,13 @@ macro(_define_relative varname parent subdir docstring) CACHE PATH "${docstring} (${_docpath})" FORCE) + elseif(${_aliasname}) + # The alias variable was given (probably on the command line): move + # it to the new name + set(KDE_INSTALL_${varname} "${${_aliasname}}" + CACHE PATH + "${docstring} (${_docpath})" + FORCE) elseif(${_cmakename}) if(_cmakename_is_deprecated) message(DEPRECATION "${_cmakename} is deprecated, use KDE_INSTALL_${varname} instead.") @@ -171,6 +183,9 @@ macro(_define_relative varname parent subdir docstring) if(_oldstylename) set(${_oldstylename} "${KDE_INSTALL_${varname}}") endif() + if (_aliasname) + set(${_aliasname} "${KDE_INSTALL_${varname}}") + endif() endmacro() # varname: the variable name suffix (eg: BINDIR for KDE_INSTALL_BINDIR) @@ -370,7 +385,7 @@ endif() set(KDE_INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Devel - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + INCLUDES DESTINATION "${KDE_INSTALL_INCLUDEDIR}" ) if(APPLE) set(KDE_INSTALL_TARGETS_DEFAULT_ARGS ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} |