Use KDE_INSTALL_DBUSINTERFACEDIR to install dbus interfaces

...and use PATH_VARS to make the config file work with absolute paths.

Two reasons to do this:
- DBUS_INTERFACES_INSTALL_DIR is marked deprecated
- Not hard-coding the packackage prefix is helpful on a multiarch
  layout where the prefix is /usr/${host} but arch-independent files
  should still be installed to /usr/share (i.e a level below the
  prefix).

REVIEW: 125843
This commit is contained in:
Heiko Becker 2015-10-28 18:15:36 +01:00
parent 89a4df651d
commit 2c4ed0aca1
2 changed files with 5 additions and 4 deletions

View file

@ -573,7 +573,7 @@ install(
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
DESTINATION
${DBUS_INTERFACES_INSTALL_DIR}
${KDE_INSTALL_DBUSINTERFACEDIR}
)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
@ -606,6 +606,7 @@ include(ECMPackageConfigHelpers)
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface")
ecm_configure_package_config_file(KWinDBusInterfaceConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake"
PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR})

View file

@ -1,5 +1,5 @@
@PACKAGE_INIT@
set(KWIN_INTERFACE "${PACKAGE_PREFIX_DIR}/@DBUS_INTERFACES_INSTALL_DIR@/org.kde.KWin.xml")
set(KWIN_COMPOSITING_INTERFACE "${PACKAGE_PREFIX_DIR}/@DBUS_INTERFACES_INSTALL_DIR@/org.kde.kwin.Compositing.xml")
set(KWIN_EFFECTS_INTERFACE "${PACKAGE_PREFIX_DIR}/@DBUS_INTERFACES_INSTALL_DIR@/org.kde.kwin.Effects.xml")
set(KWIN_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.KWin.xml")
set(KWIN_COMPOSITING_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.Compositing.xml")
set(KWIN_EFFECTS_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.Effects.xml")