diff options
author | Friedrich W. H. Kossebau <kossebau@kde.org> | 2016-11-05 10:56:07 +0100 |
---|---|---|
committer | Friedrich W. H. Kossebau <kossebau@kde.org> | 2016-11-05 10:56:07 +0100 |
commit | b60f1116b2cf0401f52060d7bdf0c524b918d23a (patch) | |
tree | c12d33ba35c7d81d01c6318ec959bc3b69c02c5c | |
parent | c983e0618662f7987bf4bd11e7647edd5cdefdbf (diff) | |
download | extra-cmake-modules-b60f1116b2cf0401f52060d7bdf0c524b918d23a.tar.gz extra-cmake-modules-b60f1116b2cf0401f52060d7bdf0c524b918d23a.tar.bz2 |
Make KDECMakeSettings work with KDE_INSTALL_DIRS_NO_DEPRECATEDv5.28.0-rc1
REVIEW: 128806
-rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index f9649632..6e53cb12 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -15,10 +15,11 @@ # # The default runtime path (used on Unix systems to search for # dynamically-linked libraries) is set to include the location that libraries -# will be installed to (as set in LIB_INSTALL_DIR), and also the linker search -# path. +# will be installed to (as set in LIB_INSTALL_DIR or, if the former is not set, +# KDE_INSTALL_LIBDIR), and also the linker search path. # -# Note that ``LIB_INSTALL_DIR`` needs to be set before including this module. +# Note that ``LIB_INSTALL_DIR`` or alternatively ``KDE_INSTALL_LIBDIR`` needs +# to be set before including this module. # Typically, this is done by including the :kde-module:`KDEInstallDirs` module. # # This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to TRUE @@ -109,11 +110,17 @@ if(NOT KDE_SKIP_RPATH_SETTINGS) # Set the default RPATH to point to useful locations, namely where the # libraries will be installed and the linker search path + # First look for the old LIB_INSTALL_DIR, then fallback to newer KDE_INSTALL_LIBDIR if(NOT LIB_INSTALL_DIR) - message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.") + if(NOT KDE_INSTALL_LIBDIR) + message(FATAL_ERROR "Neither KDE_INSTALL_LIBDIR nor LIB_INSTALL_DIR is set. Setting one is necessary for using the RPATH settings.") + else() + set(_abs_LIB_INSTALL_DIR "${KDE_INSTALL_LIBDIR}") + endif() + else() + set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") endif() - set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") if (NOT IS_ABSOLUTE "${_abs_LIB_INSTALL_DIR}") set(_abs_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") endif() |