- set(SHAREDIR "share/${PROJECT_NAME}")
- set(BINDIR "bin")
- set(DOCDIR "share/doc/${PROJECT_NAME}")
- set(MANDIR "share/man")
+ 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(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
+ set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
+ set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/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}")
+ if(NOT RUN_IN_PLACE)