[kdelibs] kdecore/auth: Fix KDE trying to install files always into the installation directory of polkitqt-1. The reason is

Michael Jansen kde at michael-jansen.biz
Sun May 8 18:33:07 CEST 2011


Git commit 8d65adce7b3e2262e464ce989bd0add197f416a3 by Michael Jansen.
Committed on 08/05/2011 at 18:18.
Pushed by mjansen into branch 'master'.

Fix KDE trying to install files always into the installation directory of polkitqt-1. The reason is
that POLKITQT-1_POLICY_FILES_INSTALL_DIR is a absolute filename in contrast to
POLKITQT-POLICY_FILES_INSTALL_DIR beeing a relative filename.

Fix it by replacing the POLKITQT-1_INSTALL_DIR part with CMAKE_INSTALL_PREFIX. The
FindPolkitQt-1.cmake file could need the same kind of solution i proposed for FindRuby.cmake.

CCMAIL: kde-buildsystem at kde.org
CCMAIL: drf54321 at gmail.com

M  +6    -1    kdecore/auth/ConfigureChecks.cmake     

http://commits.kde.org/kdelibs/8d65adce7b3e2262e464ce989bd0add197f416a3

diff --git a/kdecore/auth/ConfigureChecks.cmake b/kdecore/auth/ConfigureChecks.cmake
index 32baed4..ff17ff0 100644
--- a/kdecore/auth/ConfigureChecks.cmake
+++ b/kdecore/auth/ConfigureChecks.cmake
@@ -134,7 +134,12 @@ elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
         set(KAUTH_BACKEND_LIBS ${KAUTH_BACKEND_LIBS} ${QT_QTGUI_LIBRARY})
     endif (Q_WS_X11)
 
-    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT-1_POLICY_FILES_INSTALL_DIR} CACHE STRING 
+    # POLKITQT-1_POLICY_FILES_INSTALL_DIR has an absolute pathname, fix that.
+    string(REPLACE ${POLKITQT-1_INSTALL_DIR}
+        ${CMAKE_INSTALL_PREFIX} _KDE4_AUTH_POLICY_FILES_INSTALL_DIR
+        ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
+
+    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${_KDE4_AUTH_POLICY_FILES_INSTALL_DIR} CACHE STRING 
         "Where policy files generated by KAuth will be installed" FORCE)
 elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
     set (KAUTH_COMPILING_FAKE_BACKEND TRUE)


More information about the Kde-buildsystem mailing list