cmake: simplify definition of installation paths
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 2 Oct 2015 15:24:21 +0000 (16:24 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 5 Oct 2015 15:29:46 +0000 (16:29 +0100)
In particular, changing the meaning of DBUS_DATADIR part
way through the file is really confusing.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83539
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
cmake/CMakeLists.txt

index 4db9c67..4bde279 100644 (file)
@@ -61,23 +61,6 @@ else (DBUS_INSTALL_DIR)
        set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
 endif (DBUS_INSTALL_DIR)
 
-# autotools style
-if (NOT DATAROOTDIR)
-    set (DATAROOTDIR share)
-endif()
-
-if (NOT DATADIR)
-    set (DATADIR ${DATAROOTDIR})
-endif()
-
-if (NOT DOCDIR)
-    SET(DOCDIR ${DATAROOTDIR}/doc/dbus)
-endif()
-
-if (NOT DBUS_DATADIR)
-    SET(DBUS_DATADIR ${DATADIR})
-endif()
-
 set(DBUS_PREFIX ${DBUS_INSTALL_DIR})
 
 set(prefix                   ${DBUS_INSTALL_DIR})
@@ -87,7 +70,7 @@ set(EXPANDED_INCLUDEDIR      ${DBUS_INSTALL_DIR}/include)
 set(EXPANDED_BINDIR          ${DBUS_INSTALL_DIR}/bin)
 set(EXPANDED_SYSCONFDIR      ${DBUS_INSTALL_DIR}/etc)
 set(EXPANDED_LOCALSTATEDIR   ${DBUS_INSTALL_DIR}/var)
-set(EXPANDED_DATADIR         ${DBUS_INSTALL_DIR}/${DBUS_DATADIR})
+set(EXPANDED_DATADIR         ${DBUS_INSTALL_DIR}/share)
 set(DBUS_MACHINE_UUID_FILE   ${DBUS_INSTALL_DIR}/lib/dbus/machine-id)
 set(DBUS_BINDIR              ${EXPANDED_BINDIR})
 set(DBUS_DAEMONDIR           ${EXPANDED_BINDIR})
@@ -106,6 +89,7 @@ set(SYSCONFDIR_FROM_PKGDATADIR ${EXPANDED_SYSCONFDIR})
 set(DATADIR_FROM_PKGSYSCONFDIR ${EXPANDED_DATADIR})
 endif()
 
+# used in the C code
 set(DBUS_LIBEXECDIR          ${EXPANDED_LIBDIR})
 set(DBUS_DATADIR             ${EXPANDED_DATADIR})