diff options
Diffstat (limited to 'kde-modules')
-rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 74 | ||||
-rw-r--r-- | kde-modules/KDECompilerSettings.cmake | 29 | ||||
-rw-r--r-- | kde-modules/KDEFrameworkCompilerSettings.cmake | 21 | ||||
-rw-r--r-- | kde-modules/KDEInstallDirs.cmake | 166 |
4 files changed, 202 insertions, 88 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index 3f675519..c206ff82 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -1,46 +1,64 @@ -# Change various CMake settings to what the KDE community views as more +#.rst: +# KDECMakeSettings +# ---------------- +# +# Changes various CMake settings to what the KDE community views as more # sensible defaults. # -# It is split into three parts, which can be independently disabled if -# desired. +# It is split into three parts, which can be independently disabled if desired. +# +# Runtime Paths +# ~~~~~~~~~~~~~ # -# RPATH +# The default runtime path (used on Unix systems to search for +# dynamically-linked libraries) is set to include the location that libraries +# will be installed to (as set in LIB_INSTALL_DIR), and also the linker search +# path. # -# The default runtime path (used on Unix systems to search for -# dynamically-linked libraries) is set to include the location that -# libraries will be installed to (as set in LIB_INSTALL_DIR), and also -# the linker search path. +# Note that ``LIB_INSTALL_DIR`` needs to be set before including this module. +# Typically, this is done by including the :kde-module:`KDEInstallDirs` module. # -# Note that LIB_INSTALL_DIR needs to be set before including this -# module. Typically, this is done by including the KDEInstallDirs -# module. +# This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to TRUE +# before including this module. # -# This section can be disabled by setting -# KDE_SKIP_RPATH_SETTINGS -# to TRUE before including this module. # +# Testing +# ~~~~~~~ # -# TEST +# Testing is enabled by default, and an option (BUILD_TESTING) is provided for +# users to control this. See the CTest module documentation in the CMake manual +# for more details. # -# Testing is enabled by default, and an option (BUILD_TESTING) is -# provided for users to control this. See the CTest module -# documentation in the CMake manual for more details. +# This section can be disabled by setting ``KDE_SKIP_TEST_SETTINGS`` to TRUE +# before including this module. # -# This section can be disabled by setting -# KDE_SKIP_TEST_SETTINGS -# to TRUE before including this module. # +# Build Settings +# ~~~~~~~~~~~~~~ # -# BUILD +# Various CMake build defaults are altered, such as searching source and build +# directories for includes first and enabling automoc by default. # -# Various CMake build defaults are altered, such as searching source -# and build directories for includes first and enabling automoc by -# default. +# This section can be disabled by setting ``KDE_SKIP_BUILD_SETTINGS`` to TRUE +# before including this module. + +#============================================================================= +# Copyright 2014 Alex Merry <alex.merry@kde.org> +# Copyright 2013 Aleix Pol <aleixpol@kde.org> +# Copyright 2012-2013 Stephen Kelly <steveire@gmail.com> +# Copyright 2007 Matthias Kretz <kretz@kde.org> +# Copyright 2006-2007 Laurent Montel <montel@kde.org> +# Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> # -# This section can be disabled by setting -# KDE_SKIP_BUILD_SETTINGS -# to TRUE before including this module. +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS for details. # +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of extra-cmake-modules, substitute the full +# License text for the above reference.) ################# RPATH handling ################################## diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index d1f9d298..229e4f59 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -1,3 +1,7 @@ +#.rst: +# KDECompilerSettings +# ------------------- +# # Set useful compile and link flags for C++ (and C) code. # # Enables many more warnings than the default, and sets stricter modes @@ -5,25 +9,44 @@ # kde_target_enable_exceptions() can be used to re-enable them for a # specific target. # -# -# This module provides the following functions: +# This module provides the following functions:: # # kde_source_files_enable_exceptions([file1 [file2 [...]]]) # # Enables exceptions for specific source files. This should not be # used on source files in a language other than C++. # +# :: +# # kde_target_enable_exceptions(target <INTERFACE|PUBLIC|PRIVATE>) # # Enables exceptions for a specific target. This should not be used # on a target that has source files in a language other than C++. # +# :: +# # kde_enable_exceptions() # # Enables exceptions for C++ source files compiled for the # CMakeLists.txt file in the current directory and all subdirectories. -# +#============================================================================= +# Copyright 2014 Alex Merry <alex.merry@kde.org> +# Copyright 2013 Stephen Kelly <steveire@gmail.com> +# Copyright 2012-2013 Raphael Kubo da Costa <rakuco@FreeBSD.org> +# Copyright 2007 Matthias Kretz <kretz@kde.org> +# Copyright 2006-2007 Laurent Montel <montel@kde.org> +# Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of extra-cmake-modules, substitute the full +# License text for the above reference.) ############################################################ # Toolchain minimal requirements diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake index d0bf4dd7..3b77fc3c 100644 --- a/kde-modules/KDEFrameworkCompilerSettings.cmake +++ b/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -1,4 +1,8 @@ -# Set stricter compile and link flags for KDE Frameworks modules +#.rst: +# KDEFrameworkCompilerSettings +# ---------------------------- +# +# Set stricter compile and link flags for KDE Frameworks modules. # # The KDECompilerSettings module is included and, in addition, various # defines that affect the Qt libraries are set to enforce certain @@ -7,7 +11,22 @@ # For example, constructions like QString("foo") are prohibited, instead # forcing the use of QLatin1String or QStringLiteral, and some # Qt-defined keywords like signals and slots will not be defined. + +#============================================================================= +# Copyright 2013 Albert Astals Cid <aacid@kde.org> +# Copyright 2007 Matthias Kretz <kretz@kde.org> +# Copyright 2006-2007 Laurent Montel <montel@kde.org> +# Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS for details. # +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of extra-cmake-modules, substitute the full +# License text for the above reference.) include(KDECompilerSettings) diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake index 9ff23540..299e919e 100644 --- a/kde-modules/KDEInstallDirs.cmake +++ b/kde-modules/KDEInstallDirs.cmake @@ -1,68 +1,122 @@ -# Define KDE standard installation directories -# -# Inclusion of this module defines the following variables (default -# values in parentheses): -# -# BUNDLE_INSTALL_DIR - (Mac only) application bundles (/Applications/KDE5) -# BIN_INSTALL_DIR - user executables (bin) -# SBIN_INSTALL_DIR - system admin executables (sbin) -# LIB_INSTALL_DIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian) -# LIBEXEC_INSTALL_DIR - internal executables (${LIB_INSTALL_DIR}/kde5/libexec) -# INSTALL_TARGETS_DEFAULT_ARGS - combines BUNDLE_INSTALL_DIR, BIN_INSTALL_DIR and LIB_INSTALL_DIR; see below -# -# INCLUDE_INSTALL_DIR - C and C++ header files (include/KF5) -# -# QT_PLUGIN_INSTALL_DIR - Qt plugins (${LIB_INSTALL_DIR}/plugins) -# PLUGIN_INSTALL_DIR - KDE plugins (${QT_PLUGIN_INSTALL_DIR}/kf5) -# IMPORTS_INSTALL_DIR - QML imports (${QT_PLUGIN_INSTALL_DIR}/imports) -# QML_INSTALL_DIR - QML2 imports (${LIB_INSTALL_DIR}/qml) -# -# CMAKECONFIG_INSTALL_PREFIX - CMake configuration files (${LIB_INSTALL_DIR}/cmake) -# -# DATA_INSTALL_DIR - read-only architecture-independent data (share) -# KCONF_UPDATE_INSTALL_DIR - kconf_update files (${DATA_INSTALL_DIR}/kconf_update) -# -# DBUS_INTERFACES_INSTALL_DIR - dbus interfaces (share/dbus-1/interfaces) -# DBUS_SERVICES_INSTALL_DIR - dbus services (share/dbus-1/services) -# DBUS_SYSTEM_SERVICES_INSTALL_DIR - dbus system services (share/dbus-1/system-services) -# HTML_INSTALL_DIR - HTML documentation (share/doc/HTML) -# ICON_INSTALL_DIR - the icons (share/icons) -# KCFG_INSTALL_DIR - kconfig files (share/config.kcfg) -# LOCALE_INSTALL_DIR - translations (share/locale) -# MAN_INSTALL_DIR - man pages (share/man) -# SERVICES_INSTALL_DIR - service (desktop, protocol, ...) files (share/kde5/services) -# SERVICETYPES_INSTALL_DIR - service types desktop files (share/kde5/servicetypes) -# SOUND_INSTALL_DIR - sound files (share/sounds) -# TEMPLATES_INSTALL_DIR - templates (share/templates) -# WALLPAPER_INSTALL_DIR - wallpapers (share/wallpapers) -# XDG_APPS_INSTALL_DIR - application desktop files (share/applications/kde5) -# XDG_DIRECTORY_INSTALL_DIR - XDG directory (share/desktop-directories) -# XDG_MIME_INSTALL_DIR - mimetype XML files (share/mime/packages) -# -# SYSCONF_INSTALL_DIR - sysconfig files (etc) -# CONFIG_INSTALL_DIR - config files (${SYSCONF_INSTALL_DIR}/xdg) -# AUTOSTART_INSTALL_DIR - autostart files (${CONFIG_INSTALL_DIR}/autostart) -# -# EXEC_INSTALL_PREFIX - prefix for default values of BIN_INSTALL_DIR, SBIN_INSTALL_DIR and LIB_INSTALL_DIR (empty by default) -# SHARE_INSTALL_PREFIX - replaces "share" in the other variables if set -# -# The *_INSTALL_DIR variables may be passed to the DESTINATION options of -# install() commands for the corresponding file type. They are set in the CMake -# cache, and so the defaults above can be overridden by users. -# -# Note that these variables do not provide any information about the -# location of already-installed KDE software. +#.rst: +# KDEInstallDirs +# -------------- +# +# Define KDE standard installation directories. +# +# Inclusion of this module defines the following variables (default values in +# parentheses): +# +# ``BUNDLE_INSTALL_DIR`` +# (Mac only) application bundles (``/Applications/KDE5``) +# ``BIN_INSTALL_DIR`` +# user executables (``bin``) +# ``SBIN_INSTALL_DIR`` +# system admin executables (``sbin``) +# ``LIB_INSTALL_DIR`` +# object code libraries (``lib or lib64 or lib/<multiarch-tuple> on +# Debian``) +# ``LIBEXEC_INSTALL_DIR`` +# internal executables (``${LIB_INSTALL_DIR}/kde5/libexec``) +# ``INSTALL_TARGETS_DEFAULT_ARGS`` +# combines BUNDLE_INSTALL_DIR, BIN_INSTALL_DIR and LIB_INSTALL_DIR; see +# below +# ``INCLUDE_INSTALL_DIR`` +# C and C++ header files (``include/KF5``) +# ``QT_PLUGIN_INSTALL_DIR`` +# Qt plugins (``${LIB_INSTALL_DIR}/plugins``) +# ``PLUGIN_INSTALL_DIR`` +# KDE plugins (``${QT_PLUGIN_INSTALL_DIR}/kf5``) +# ``IMPORTS_INSTALL_DIR`` +# QML imports (``${QT_PLUGIN_INSTALL_DIR}/imports``) +# ``QML_INSTALL_DIR`` +# QML2 imports (``${LIB_INSTALL_DIR}/qml``) +# ``CMAKECONFIG_INSTALL_PREFIX`` +# CMake configuration files (``${LIB_INSTALL_DIR}/cmake``) +# ``DATA_INSTALL_DIR`` +# read-only architecture-independent data (``share``) +# ``KCONF_UPDATE_INSTALL_DIR`` +# kconf_update files (``${DATA_INSTALL_DIR}/kconf_update``) +# ``DBUS_INTERFACES_INSTALL_DIR`` +# dbus interfaces (``share/dbus-1/interfaces``) +# ``DBUS_SERVICES_INSTALL_DIR`` +# dbus services (``share/dbus-1/services``) +# ``DBUS_SYSTEM_SERVICES_INSTALL_DIR`` +# dbus system services (``share/dbus-1/system-services``) +# ``HTML_INSTALL_DIR`` +# HTML documentation (``share/doc/HTML``) +# ``ICON_INSTALL_DIR`` +# the icons (``share/icons``) +# ``KCFG_INSTALL_DIR`` +# kconfig files (``share/config.kcfg``) +# ``LOCALE_INSTALL_DIR`` +# translations (``share/locale``) +# ``MAN_INSTALL_DIR`` +# man pages (``share/man``) +# ``SERVICES_INSTALL_DIR`` +# service (desktop, protocol, ...) files (``share/kde5/services``) +# ``SERVICETYPES_INSTALL_DIR`` +# service types desktop files (``share/kde5/servicetypes``) +# ``SOUND_INSTALL_DIR`` +# sound files (``share/sounds``) +# ``TEMPLATES_INSTALL_DIR`` +# templates (``share/templates``) +# ``WALLPAPER_INSTALL_DIR`` +# wallpapers (``share/wallpapers``) +# ``XDG_APPS_INSTALL_DIR`` +# application desktop files (``share/applications/kde5``) +# ``XDG_DIRECTORY_INSTALL_DIR`` +# XDG directory (``share/desktop-directories``) +# ``XDG_MIME_INSTALL_DIR`` +# mimetype XML files (``share/mime/packages``) +# ``SYSCONF_INSTALL_DIR`` +# sysconfig files (``etc``) +# ``CONFIG_INSTALL_DIR`` +# config files (``${SYSCONF_INSTALL_DIR}/xdg``) +# ``AUTOSTART_INSTALL_DIR`` +# autostart files (``${CONFIG_INSTALL_DIR}/autostart``) +# ``EXEC_INSTALL_PREFIX`` +# prefix for default values of BIN_INSTALL_DIR, SBIN_INSTALL_DIR and +# LIB_INSTALL_DIR (``empty by default``) +# ``SHARE_INSTALL_PREFIX`` +# replaces "share" in the other variables if set +# +# The ``*_INSTALL_DIR`` variables may be passed to the DESTINATION options of +# install() commands for the corresponding file type. They are set in the +# CMake cache, and so the defaults above can be overridden by users. +# +# Note that these variables do not provide any information about the location of +# already-installed KDE software. # # The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries or # user-executable applications are installed, in the following manner: # -# install(TARGETS mylib myapp ${INSTALL_TARGETS_DEFAULT_ARGS}) +# .. code-block:: cmake +# +# install(TARGETS mylib myapp ${INSTALL_TARGETS_DEFAULT_ARGS}) # # It MUST NOT be used for installing plugins, system admin executables or # executables only intended for use internally by other code. Those should use # one of the PLUGIN variables, SBIN_INSTALL_DIR or LIBEXEC_INSTALL_DIR # respectively. -# + +#============================================================================= +# Copyright 2014 Alex Merry <alex.merry@kde.org> +# Copyright 2013 Stephen Kelly <steveire@gmail.com> +# Copyright 2012 David Faure <faure@kde.org> +# Copyright 2007 Matthias Kretz <kretz@kde.org> +# Copyright 2006-2007 Laurent Montel <montel@kde.org> +# Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file COPYING-CMAKE-SCRIPTS for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of extra-cmake-modules, substitute the full +# License text for the above reference.) # Figure out what the default install directory for libraries should be. |