1 # This file sets up install locations for Quassel
3 # (C) 2015 by the Quassel Project <devel@quassel-irc.org>
5 # Redistribution and use is allowed according to the terms of the BSD license.
6 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
9 # Setup install locations
10 #####################################################################
12 # We support the CMake standard variables (CMAKE_INSTALL_<TYPE>_DIR),
13 # which can be overridden on the command line. If KDE integration is enabled,
14 # we make use of its settings.
18 # On Windows, we have to guess good paths
19 # We must check if the variables are already defined on the command line
20 if (NOT DEFINED CMAKE_INSTALL_BINDIR)
21 set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Install path for binaries")
23 if (NOT DEFINED CMAKE_INSTALL_DATADIR)
24 set(CMAKE_INSTALL_DATADIR "$ENV{APPDATA}/quassel-irc.org/share/apps" CACHE PATH "Install path for data files")
26 if (NOT DEFINED CMAKE_INSTALL_ICONDIR)
27 set(CMAKE_INSTALL_ICONDIR "$ENV{APPDATA}/quassel-irc.org/share/icons" CACHE PATH "Install path for icons")
29 if (NOT DEFINED CMAKE_INSTALL_APPDIR)
30 set(CMAKE_INSTALL_APPDIR "$ENV{APPDATA}/quassel-irc.org/share/applications" CACHE PATH "Install path for .desktop files")
33 # This sets the standard variables; however it doesn't know about icons and apps
34 include(GNUInstallDirs)
36 # Special treatment for paths relative to DATAROOTDIR, as found in GNUInstallDirs
37 if (NOT CMAKE_INSTALL_ICONDIR)
38 set(CMAKE_INSTALL_ICONDIR "" CACHE PATH "Install path for icons")
39 set(CMAKE_INSTALL_ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/icons")
41 if (NOT CMAKE_INSTALL_APPDIR)
42 set(CMAKE_INSTALL_APPDIR "" CACHE PATH "Install path for .desktop files")
43 set(CMAKE_INSTALL_APPDIR "${CMAKE_INSTALL_DATAROOTDIR}/applications")
48 # FindKDE4Internal.cmake sets its own set of variables, however with deprecated names
49 if (NOT DEFINED CMAKE_INSTALL_BINDIR)
50 set(CMAKE_INSTALL_BINDIR "${BIN_INSTALL_DIR}" CACHE PATH "Install path for binaries")
52 if (NOT DEFINED CMAKE_INSTALL_DATADIR)
53 set(CMAKE_INSTALL_DATADIR "${DATA_INSTALL_DIR}" CACHE PATH "Install path for data files")
55 if (NOT DEFINED CMAKE_INSTALL_ICONDIR)
56 set(CMAKE_INSTALL_ICONDIR "${ICON_INSTALL_DIR}" CACHE PATH "Install path for icons")
58 if (NOT DEFINED CMAKE_INSTALL_APPDIR)
59 set(CMAKE_INSTALL_APPDIR "${XDG_APPS_INSTALL_DIR}" CACHE PATH "Install path for .desktop files")
63 # KF5 does the correct thing, so we don't need to do anything
64 # We have already included KDEInstallDirs at this point.