cmake: Remove build system support for Qt4/KDE4
[quassel.git] / cmake / QuasselInstallDirs.cmake
1 # This file sets up install locations for Quassel
2 #
3 # (C) 2015 by the Quassel Project <devel@quassel-irc.org>
4 #
5 # Redistribution and use is allowed according to the terms of the BSD license.
6 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
7
8
9 # Setup install locations
10 #####################################################################
11
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.
15
16 if (NOT WITH_KDE)
17     if (WIN32)
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")
22         endif()
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")
25         endif()
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")
28         endif()
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")
31         endif()
32     else()
33         # This sets the standard variables; however it doesn't know about icons and apps
34         include(GNUInstallDirs)
35
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")
40         endif()
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")
44         endif()
45     endif()
46 endif()