+ if(RUN_IN_PLACE)
+ set(SHAREDIR ".")
+ set(BINDIR "bin")
+ set(DOCDIR "doc")
+ set(EXAMPLE_CONF_DIR ".")
+ set(MANDIR "unix/man")
+ set(XDG_APPS_DIR "unix/applications")
+ set(ICONDIR "unix/icons")
+ set(LOCALEDIR "locale")
+ else()
+ set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
+ set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
+ set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
+ set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ set(EXAMPLE_CONF_DIR ${DOCDIR})
+ set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
+ set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
+ set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
+ endif()
+endif()
+
+set(CUSTOM_SHAREDIR "" CACHE STRING "Directory to install data files into")
+if(NOT CUSTOM_SHAREDIR STREQUAL "")
+ set(SHAREDIR "${CUSTOM_SHAREDIR}")
+ message(STATUS "Using SHAREDIR=${SHAREDIR}")
+endif()
+set(CUSTOM_BINDIR "" CACHE STRING "Directory to install binaries into")
+if(NOT CUSTOM_BINDIR STREQUAL "")
+ set(BINDIR "${CUSTOM_BINDIR}")
+ message(STATUS "Using BINDIR=${BINDIR}")
+endif()
+set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into")
+if(NOT CUSTOM_DOCDIR STREQUAL "")
+ set(DOCDIR "${CUSTOM_DOCDIR}")
+ message(STATUS "Using DOCDIR=${DOCDIR}")
+endif()
+set(CUSTOM_MANDIR "" CACHE STRING "Directory to install manpages into")
+if(NOT CUSTOM_MANDIR STREQUAL "")
+ set(MANDIR "${CUSTOM_MANDIR}")
+ message(STATUS "Using MANDIR=${MANDIR}")
+endif()
+set(CUSTOM_EXAMPLE_CONF_DIR "" CACHE STRING "Directory to install example config file into")
+if(NOT CUSTOM_EXAMPLE_CONF_DIR STREQUAL "")
+ set(EXAMPLE_CONF_DIR "${CUSTOM_EXAMPLE_CONF_DIR}")
+ message(STATUS "Using EXAMPLE_CONF_DIR=${EXAMPLE_CONF_DIR}")
+endif()
+set(CUSTOM_XDG_APPS_DIR "" CACHE STRING "Directory to install .desktop files into")
+if(NOT CUSTOM_XDG_APPS_DIR STREQUAL "")
+ set(XDG_APPS_DIR "${CUSTOM_XDG_APPS_DIR}")
+ message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
+endif()
+set(CUSTOM_ICONDIR "" CACHE STRING "Directory to install icons into")
+if(NOT CUSTOM_ICONDIR STREQUAL "")
+ set(ICONDIR "${CUSTOM_ICONDIR}")
+ message(STATUS "Using ICONDIR=${ICONDIR}")
+endif()
+set(CUSTOM_LOCALEDIR "" CACHE STRING "Directory to install l10n files into")
+if(NOT CUSTOM_LOCALEDIR STREQUAL "")
+ set(LOCALEDIR "${CUSTOM_LOCALEDIR}")
+ message(STATUS "Using LOCALEDIR=${LOCALEDIR}")