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}/bin" CACHE PATH "Install path for executables and DLLs")
23 if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
24 set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Install path for static libraries")
26 if (NOT DEFINED CMAKE_INSTALL_DATADIR)
27 set(CMAKE_INSTALL_DATADIR "$ENV{APPDATA}/quassel-irc.org/share/apps" CACHE PATH "Install path for data files")
29 if (NOT DEFINED CMAKE_INSTALL_ICONDIR)
30 set(CMAKE_INSTALL_ICONDIR "$ENV{APPDATA}/quassel-irc.org/share/icons" CACHE PATH "Install path for icons")
32 if (NOT DEFINED CMAKE_INSTALL_APPDIR)
33 set(CMAKE_INSTALL_APPDIR "$ENV{APPDATA}/quassel-irc.org/share/applications" CACHE PATH "Install path for .desktop files")
36 # This sets the standard variables; however it doesn't know about icons and apps
37 include(GNUInstallDirs)
39 # Special treatment for paths relative to DATAROOTDIR, as found in GNUInstallDirs
40 if (NOT CMAKE_INSTALL_ICONDIR)
41 set(CMAKE_INSTALL_ICONDIR "" CACHE PATH "Install path for icons")
42 set(CMAKE_INSTALL_ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/icons")
44 if (NOT CMAKE_INSTALL_APPDIR)
45 set(CMAKE_INSTALL_APPDIR "" CACHE PATH "Install path for .desktop files")
46 set(CMAKE_INSTALL_APPDIR "${CMAKE_INSTALL_DATAROOTDIR}/applications")