########### basic vars ###############
if (DBUSDIR)
- set(DBUS_INSTALL_DIR "${DBUSDIR}" CACHE TYPE STRING)
-else (DBUSDIR)
- set(DBUS_INSTALL_DIR "$ENV{DBUSDIR}" CACHE TYPE STRING)
+ set(DBUS_INSTALL_DIR "${DBUSDIR}")
endif (DBUSDIR)
-
-if (NOT DBUS_INSTALL_DIR)
- set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE TYPE STRING)
-endif (NOT DBUS_INSTALL_DIR)
+if ($ENV{DBUSDIR})
+ set(DBUS_INSTALL_DIR "$ENV{DBUSDIR}")
+endif ($ENV{DBUSDIR})
+
+if (DBUS_INSTALL_DIR)
+ set(CMAKE_INSTALL_PREFIX "${DBUS_INSTALL_DIR}" CACHE TYPE PATH FORCE)
+else (DBUS_INSTALL_DIR)
+ set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
+endif (DBUS_INSTALL_DIR)
# TODO: setting EXPANDED_... has nothing to do with DBUS_INSTALL_SYSTEM_LIBS
if (DBUS_INSTALL_SYSTEM_LIBS)