<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/5e5b8678c6009734a6649f5aae8f94e5dfd8f0fa">https://github.com/macports/macports-ports/commit/5e5b8678c6009734a6649f5aae8f94e5dfd8f0fa</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'>     new 5e5b867  kde4-workspace : make build on 10.14 (and newer).
</span>5e5b867 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 5e5b8678c6009734a6649f5aae8f94e5dfd8f0fa
</span>Author: RenĂ© J.V. Bertin <rjvbertin@gmail.com>
AuthorDate: Mon Nov 12 14:53:39 2018 +0100

<span style='display:block; white-space:pre;color:#404040;'>    kde4-workspace : make build on 10.14 (and newer).
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The KDE build system imposes hidden visibility by default in
</span><span style='display:block; white-space:pre;color:#404040;'>    order to reduce shared library loading times a bit. This can
</span><span style='display:block; white-space:pre;color:#404040;'>    cause an incompatibility when using Xcode compilers ("AppleClang");
</span><span style='display:block; white-space:pre;color:#404040;'>    in case of kde4-workspace on 10.14 (and up?).
</span><span style='display:block; white-space:pre;color:#404040;'>    The only workaround for now is 1) to use a "stock" clang (clang 4
</span><span style='display:block; white-space:pre;color:#404040;'>    or newer) or 2) to disable the use of hidden visibility.
</span><span style='display:block; white-space:pre;color:#404040;'>    This change implements option 2 by using a patched version of the
</span><span style='display:block; white-space:pre;color:#404040;'>    FindKDE4Internal cmake script, on 10.14 and up.
</span>---
 kde/kde4-workspace/Portfile                     |   14 +
 kde/kde4-workspace/files/FindKDE4Internal.cmake | 1491 +++++++++++++++++++++++
 2 files changed, 1505 insertions(+)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/kde/kde4-workspace/Portfile b/kde/kde4-workspace/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c78470e..334fa9b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/kde/kde4-workspace/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/kde/kde4-workspace/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,6 +55,20 @@ variant oxygen description {Build the Oxygen theme} {
</span> 
 default_variants    +oxygen
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# maintainer convience: let the build go as far as possible to collect as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# many errors as possible (if any) in a single pass.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.post_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    -k
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} >= 18} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # 10.14 "Mojave" seems to get confused about symbol visibility in this port, so turn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # off selective visibility and make all symbols public.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        xinstall -m 755 ${filespath}/FindKDE4Internal.cmake ${worksrcpath}/cmake/modules/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cmake/modules/FindKDE4Internal.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-destroot {
     ln -s ${applications_dir}/KDE4/plasma-windowed.app/Contents/MacOS/plasma-windowed ${destroot}${prefix}/bin/plasma-windowed
 }
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/kde/kde4-workspace/files/FindKDE4Internal.cmake b/kde/kde4-workspace/files/FindKDE4Internal.cmake
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..601e172
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/kde/kde4-workspace/files/FindKDE4Internal.cmake
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,1491 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - Find the KDE4 include and library dirs, KDE preprocessors and define a some macros
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This module defines the following variables:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_FOUND               - set to TRUE if everything required for building KDE software has been found
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_DEFINITIONS         - compiler definitions required for compiling KDE software
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INCLUDE_DIR         - the KDE 4 include directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INCLUDES            - all include directories required for KDE, i.e.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                             KDE4_INCLUDE_DIR, but also the Qt4 include directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                             and other platform specific include directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_LIB_DIR             - the directory where the KDE libraries are installed,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                             intended to be used with LINK_DIRECTORIES(). In general, this is not necessary.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_LIBEXEC_INSTALL_DIR - the directory where libexec executables from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_BIN_INSTALL_DIR     - the directory where executables from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SBIN_INSTALL_DIR    - the directory where system executables from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_DATA_INSTALL_DIR    - the parent directory where kdelibs applications install their data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_HTML_INSTALL_DIR    - the directory where HTML documentation from kdelibs is installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_CONFIG_INSTALL_DIR  - the directory where config files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ICON_INSTALL_DIR    - the directory where icons from kdelibs are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_IMPORTS_INSTALL_DIR - the directory where imports from kdelibs are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KCFG_INSTALL_DIR    - the directory where kconfig files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_LOCALE_INSTALL_DIR  - the directory where translations from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_MIME_INSTALL_DIR    - the directory where mimetype desktop files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SOUND_INSTALL_DIR   - the directory where sound files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_TEMPLATES_INSTALL_DIR     - the directory where templates (Create new file...) from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_WALLPAPER_INSTALL_DIR     - the directory where wallpapers from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KCONF_UPDATE_INSTALL_DIR  - the directory where kconf_update files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_AUTOSTART_INSTALL_DIR     - the directory where autostart from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_XDG_APPS_INSTALL_DIR      - the XDG apps dir from kdelibs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_XDG_DIRECTORY_INSTALL_DIR - the XDG directory from kdelibs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SYSCONF_INSTALL_DIR       - the directory where sysconfig files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_MAN_INSTALL_DIR           - the directory where man pages from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INFO_INSTALL_DIR          - the directory where info files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_DBUS_INTERFACES_DIR       - the directory where dbus interfaces from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_DBUS_SERVICES_DIR         - the directory where dbus service files from kdelibs are installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The following variables are defined for the various tools required to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compile KDE software:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KCFGC_EXECUTABLE    - the kconfig_compiler executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_AUTOMOC_EXECUTABLE  - the kde4automoc executable, deprecated, use AUTOMOC4_EXECUTABLE instead
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_MEINPROC_EXECUTABLE - the meinproc4 executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The following variables point to the location of the KDE libraries,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# but shouldn't be used directly:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDECORE_LIBRARY     - the kdecore library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDEUI_LIBRARY       - the kdeui library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KIO_LIBRARY         - the kio library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KPARTS_LIBRARY      - the kparts library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KUTILS_LIBRARY      - the kutils library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KEMOTICONS_LIBRARY  - the kemoticons library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KIDLETIME_LIBRARY   - the kidletime library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KCMUTILS_LIBRARY    - the kcmutils library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KPRINTUTILS_LIBRARY - the kprintutils library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDE3SUPPORT_LIBRARY - the kde3support library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KFILE_LIBRARY       - the kfile library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KHTML_LIBRARY       - the khtml library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KJS_LIBRARY         - the kjs library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KJSAPI_LIBRARY      - the kjs public api library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNEWSTUFF2_LIBRARY  - the knewstuff2 library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNEWSTUFF3_LIBRARY  - the knewstuff3 library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDNSSD_LIBRARY      - the kdnssd library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_PHONON_LIBRARY      - the phonon library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_THREADWEAVER_LIBRARY- the threadweaver library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SOLID_LIBRARY       - the solid library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNOTIFYCONFIG_LIBRARY- the knotifyconfig library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KROSSCORE_LIBRARY   - the krosscore library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KTEXTEDITOR_LIBRARY - the ktexteditor library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_NEPOMUK_LIBRARY     - the nepomuk library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_PLASMA_LIBRARY      - the plasma library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KUNITCONVERSION_LIBRARY - the kunitconversion library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDEWEBKIT_LIBRARY   - the kdewebkit library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_PLASMA_OPENGL_FOUND  - TRUE if the OpenGL support of Plasma has been found, NOTFOUND otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Compared to the variables above, the following variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# also contain all of the depending libraries, so the variables below
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# should be used instead of the ones above:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDECORE_LIBS          - the kdecore library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDEUI_LIBS            - the kdeui library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KIO_LIBS              - the kio library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KPARTS_LIBS           - the kparts library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KUTILS_LIBS           - the kutils library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KEMOTICONS_LIBS       - the kemoticons library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KIDLETIME_LIBS        - the kidletime library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KCMUTILS_LIBS         - the kcmutils library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KPRINTUTILS_LIBS      - the kprintutils library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDE3SUPPORT_LIBS      - the kde3support library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KFILE_LIBS            - the kfile library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KHTML_LIBS            - the khtml library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KJS_LIBS              - the kjs library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KJSAPI_LIBS           - the kjs public api library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNEWSTUFF2_LIBS       - the knewstuff2 library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNEWSTUFF3_LIBS       - the knewstuff3 library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDNSSD_LIBS           - the kdnssd library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDESU_LIBS            - the kdesu library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KPTY_LIBS             - the kpty library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_PHONON_LIBS           - the phonon library and all depending librairies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_THREADWEAVER_LIBRARIES- the threadweaver library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SOLID_LIBS            - the solid library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KNOTIFYCONFIG_LIBS    - the knotify config library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KROSSCORE_LIBS        - the kross core library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KROSSUI_LIBS          - the kross ui library which includes core and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KTEXTEDITOR_LIBS      - the ktexteditor library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_NEPOMUK_LIBS          - the nepomuk library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_PLASMA_LIBS           - the plasma library and all depending librairies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KUNITCONVERSION_LIBS  - the kunitconversion library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_KDEWEBKIT_LIBS        - the kdewebkit library and all depending libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This module defines also a bunch of variables used as locations for install directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# for files of the package which is using this module. These variables don't say
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# anything about the location of the installed KDE.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# They can be relative (to CMAKE_INSTALL_PREFIX) or absolute.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Under Windows they are always relative.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  BIN_INSTALL_DIR          - the directory where executables will be installed (default is prefix/bin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  BUNDLE_INSTALL_DIR       - Mac only: the directory where application bundles will be installed (default is /Applications/KDE4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SBIN_INSTALL_DIR         - the directory where system executables will be installed (default is prefix/sbin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  LIB_INSTALL_DIR          - the directory where libraries will be installed (default is prefix/lib)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  CONFIG_INSTALL_DIR       - the directory where config files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DATA_INSTALL_DIR         - the parent directory where applications can install their data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  HTML_INSTALL_DIR         - the directory where HTML documentation will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  ICON_INSTALL_DIR         - the directory where the icons will be installed (default prefix/share/icons/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  INFO_INSTALL_DIR         - the directory where info files will be installed (default prefix/info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KCFG_INSTALL_DIR         - the directory where kconfig files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  LOCALE_INSTALL_DIR       - the directory where translations will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  MAN_INSTALL_DIR          - the directory where man pages will be installed (default prefix/man/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  MIME_INSTALL_DIR         - the directory where mimetype desktop files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  PLUGIN_INSTALL_DIR       - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  IMPORTS_INSTALL_DIR      - the subdirectory relative to the install prefix where imports will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SERVICES_INSTALL_DIR     - the directory where service (desktop, protocol, ...) files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SERVICETYPES_INSTALL_DIR - the directory where servicestypes desktop files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SOUND_INSTALL_DIR        - the directory where sound files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  TEMPLATES_INSTALL_DIR    - the directory where templates (Create new file...) will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  WALLPAPER_INSTALL_DIR    - the directory where wallpapers will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  AUTOSTART_INSTALL_DIR    - the directory where autostart files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DEMO_INSTALL_DIR         - the directory where demos will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KCONF_UPDATE_INSTALL_DIR - the directory where kconf_update files will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SYSCONF_INSTALL_DIR      - the directory where sysconfig files will be installed (default /etc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  XDG_APPS_INSTALL_DIR     - the XDG apps dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  XDG_DIRECTORY_INSTALL_DIR- the XDG directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  XDG_MIME_INSTALL_DIR     - the XDG mimetypes install dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DBUS_INTERFACES_INSTALL_DIR - the directory where dbus interfaces will be installed (default is prefix/share/dbus-1/interfaces)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DBUS_SERVICES_INSTALL_DIR        - the directory where dbus services will be installed (default is prefix/share/dbus-1/services )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DBUS_SYSTEM_SERVICES_INSTALL_DIR        - the directory where dbus system services will be installed (default is prefix/share/dbus-1/system-services )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The variable INSTALL_TARGETS_DEFAULT_ARGS can be used when installing libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# or executables into the default locations.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# It should also be used when installing applications, since then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# on OS X application bundles will be installed to BUNDLE_INSTALL_DIR.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The variable MUST NOT be used for installing plugins.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# It also MUST NOT be used for executables which are intended to go into sbin/ or libexec/.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Usage is like this:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# into bin/.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The following variable is provided, but seem to be unused:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  LIBS_HTML_INSTALL_DIR    /share/doc/HTML            CACHE STRING "Is this still used ?")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The following user adjustable options are provided:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ENABLE_FINAL - enable KDE-style enable-final all-in-one-compilation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_BUILD_TESTS  - enable this to build the testcases
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ENABLE_FPIE  - enable it to use gcc Position Independent Executables feature
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR - only present for CMake >= 2.6.3, defaults to TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                      If enabled, the package should install its <package>Config.cmake file to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                      lib/cmake/<package>/ instead to lib/<package>/cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_SERIALIZE_TOOL - wrapper to serialize potentially resource-intensive commands during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                      parallel builds (set to 'icecc' when using icecream)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# It also adds the following macros and functions (from KDE4Macros.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use this to add Qt designer ui files to your application/library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_UI3_FILES (SRCS_VAR file1.ui ... fileN.ui)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use this to add Qt designer ui files from Qt version 3 to your application/library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] [USE_RELATIVE_PATH] file1.kcfgc ... fileN.kcfgc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use this to add KDE config compiler files to your application/library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use optional USE_RELATIVE_PATH to generate the classes in the build following the given
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    relative path to the file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Use this to add widget description files for the makekdewidgets code generator
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    for Qt Designer plugins.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    This macro is intended mainly for internal uses.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    It is used for enable-final. It will generate two source files,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    one for the C files and one for the C++ files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    These files will have the names given in filename_CXX and filename_C.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_PLUGIN ( name [WITH_PREFIX] file1 ... fileN )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    It supports KDE4_ENABLE_FINAL.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Create a KDE application in the form of a module loadable via kdeinit.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    A library named kdeinit_<name> will be created and a small executable which links to it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    It supports KDE4_ENABLE_FINAL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    If the executable doesn't have a GUI, use the option NOGUI. By default on OS X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    application bundles are created, with the NOGUI option no bundles but simple executables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    are created. Under Windows this flag is also necessary to separate between applications
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    with GUI and without. On other UNIX systems this flag has no effect.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    RUN_UNINSTALLED is deprecated and is ignored, for details see the documentation for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    KDE4_ADD_EXECUTABLE().
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_EXECUTABLE (name [NOGUI] [TEST] [RUN_UNINSTALLED] file1 ... fileN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Equivalent to ADD_EXECUTABLE(), but additionally adds some more features:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    -support for KDE4_ENABLE_FINAL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    -support for automoc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    -automatic RPATH handling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    If the executable doesn't have a GUI, use the option NOGUI. By default on OS X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    application bundles are created, with the NOGUI option no bundles but simple executables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    are created. Under Windows this flag is also necessary to separate between applications
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    with GUI and without. On other UNIX systems this flag has no effect.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    The option TEST is for internal use only.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    The option RUN_UNINSTALLED is ignored. It was necessary with KDE 4.0 and 4.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    if the executable had to be run from the build tree. Since KDE 4.2 all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    executables can be always run uninstalled (the RPATH of executables which are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    yet installed points since then into the buildtree and is changed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    to the proper location when installing, so RUN_UNINSTALLED is not necessary anymore).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Equivalent to ADD_LIBRARY(). Additionally it supports KDE4_ENABLE_FINAL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    includes automoc-handling and sets LINK_INTERFACE_LIBRARIES target property empty.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    The RPATH is set according to the global RPATH settings as set up by FindKDE4Internal.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    (CMAKE_SKIP_BUILD_RPATH=FALSE, CMAKE_BUILD_WITH_INSTALL_RPATH=FALSE, CMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Under Windows it adds a -DMAKE_<name>_LIB definition to the compilation.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_UNIT_TEST (testname [TESTNAME targetname] file1 ... fileN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    add a unit test, which is executed when running make test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    it will be built with RPATH poiting to the build dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    The targets are always created, but only built for the "all"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    are created but not built by default. You can build them by manually building the target.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    The name of the target can be specified using TESTNAME <targetname>, if it is not given
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    the macro will default to the <testname>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    KDESRCDIR is set to the source directory of the test, this can be used with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    KGlobal::dirs()->addResourceDir( "data", KDESRCDIR )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_ADD_APP_ICON (SRCS_VAR pattern)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  adds an application icon to target source list.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Make sure you have a 128x128 icon, or the icon won't display on Mac OS X.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Mac OSX notes : the application icon is added to a Mac OS X bundle so that Finder and friends show the right thing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Win32 notes: the application icon(s) are compiled into the application
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  There is some workaround in kde4_add_kdeinit_executable to make it possible for those applications as well.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Parameters:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  SRCS_VAR  - specifies the list of source files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  pattern   - regular expression for searching application icons
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Example: KDE4_ADD_APP_ICON( myapp_SOURCES "pics/cr*-myapp.png")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Example: KDE4_ADD_APP_ICON( myapp_KDEINIT_SRCS "icons/oxygen/*/apps/myapp.png")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_UPDATE_ICONCACHE()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Notifies the icon cache that new icons have been installed by updating
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    mtime of ${ICON_INSTALL_DIR}/hicolor directory.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INSTALL_ICONS( path theme)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    Installs all png and svgz files in the current directory to the icon
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#    directory given in path, in the subdirectory for the given icon theme.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_CREATE_HANDBOOK( docbookfile [INSTALL_DESTINATION installdest] [SUBDIR subdir])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   Create the handbook from the docbookfile (using meinproc4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   The resulting handbook will be installed to <installdest> when using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   INSTALL_DESTINATION <installdest>, or to <installdest>/<subdir> if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   SUBDIR <subdir> is specified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_CREATE_MANPAGE( docbookfile section )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   Create the manpage for the specified section from the docbookfile (using meinproc4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   The resulting manpage will be installed to <installdest> when using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   INSTALL_DESTINATION <installdest>, or to <installdest>/<subdir> if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   SUBDIR <subdir> is specified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INSTALL_AUTH_ACTIONS( HELPER_ID ACTIONS_FILE )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   This macro generates an action file, depending on the backend used, for applications using KAuth.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   for file format). The macro will take care of generating the file according to the backend specified,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   the install phase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  KDE4_INSTALL_AUTH_HELPER_FILES( HELPER_TARGET HELPER_ID HELPER_USER )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   This macro adds the needed files for an helper executable meant to be used by applications using KAuth.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   It accepts the helper target, the helper ID (the DBUS name) and the user under which the helper will run on.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   This macro takes care of generate the needed files, and install them in the right location. This boils down
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   to a DBus policy to let the helper register on the system bus, and a service file for letting the helper
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   being automatically activated by the system bus.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  A note on the possible values for CMAKE_BUILD_TYPE and how KDE handles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  the flags for those buildtypes. FindKDE4Internal supports the values
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Debug, Release, RelWithDebInfo, Profile and Debugfull:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          optimised for speed, qDebug/kDebug turned off, no debug symbols, no asserts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  RelWithDebInfo (Release with debug info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          similar to Release, optimised for speed, but with debugging symbols on (-g)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          optimised but debuggable, debugging on (-g)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          (-fno-reorder-blocks -fno-schedule-insns -fno-inline)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  DebugFull
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          no optimization, full debugging on (-g3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  Profile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#          DebugFull + -ftest-coverage -fprofile-arcs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  The default buildtype is RelWithDebInfo.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  It is expected that the "Debug" build type be still debuggable with gdb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  without going all over the place, but still produce better performance.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  It's also important to note that gcc cannot detect all warning conditions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  unless the optimiser is active.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  This module allows to depend on a particular minimum version of kdelibs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  To acomplish that one should use the appropriate cmake syntax for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  find_package. For example to depend on kdelibs >= 4.1.0 one should use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  find_package(KDE4 4.1.0 REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  In earlier versions of KDE you could use the variable KDE_MIN_VERSION to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  have such a dependency. This variable is deprecated with KDE 4.2.0, but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  will still work to make the module backwards-compatible.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  _KDE4_PLATFORM_INCLUDE_DIRS is used only internally
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  _KDE4_PLATFORM_DEFINITIONS is used only internally
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Copyright (c) 2006-2009, Alexander Neundorf <neundorf@kde.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Redistribution and use is allowed according to the terms of the BSD license.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+message(STATUS "Using private FindKDE4Internal module to deactivate hidden visibility building")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# this is required now by cmake 2.6 and so must not be skipped by if(KDE4_FOUND) below
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# set the cmake policies to the 2.4.x compatibility settings (may change for KDE 4.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake_policy(VERSION 2.4.5)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Policy 25=new: identify Apple Clang as AppleClang to ensure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#                consistency in compiler feature determination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Policy 60=new: don't rewrite ${prefix}/lib/libfoo.dylib as -lfoo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake_policy(SET CMP0025 NEW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake_policy(SET CMP0060 NEW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Only do something if it hasn't been found yet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(NOT KDE4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# get the directory of the current file, used later on in the file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#get_filename_component( kde_cmake_module_dir  ${CMAKE_CURRENT_LIST_FILE} PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set( kde_cmake_module_dir  "@PREFIX@/share/apps/cmake/modules")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+include (MacroEnsureVersion)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# We may only search for other packages with "REQUIRED" if we are required ourselves.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This file can be processed either (usually) included in FindKDE4.cmake or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# (when building kdelibs) directly via FIND_PACKAGE(KDE4Internal), that's why
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we have to check for both KDE4_FIND_REQUIRED and KDE4Internal_FIND_REQUIRED.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(_REQ_STRING_KDE4 "REQUIRED")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(_REQ_STRING_KDE4_MESSAGE "FATAL_ERROR")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(_REQ_STRING_KDE4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(_REQ_STRING_KDE4_MESSAGE "STATUS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Store CMAKE_MODULE_PATH and then append the current dir to it, so we are sure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we get the FindQt4.cmake located next to us and not a different one.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The original CMAKE_MODULE_PATH is restored later on.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(_kde_cmake_module_path_back ${CMAKE_MODULE_PATH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(CMAKE_MODULE_PATH ${kde_cmake_module_dir} ${CMAKE_MODULE_PATH} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# if the minimum Qt requirement is changed, change all occurrence in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# following lines
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if( NOT QT_MIN_VERSION )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(QT_MIN_VERSION "4.8.0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif( NOT QT_MIN_VERSION )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if( ${QT_MIN_VERSION} VERSION_LESS "4.8.0" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(QT_MIN_VERSION "4.8.0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif( ${QT_MIN_VERSION} VERSION_LESS "4.8.0" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Tell FindQt4.cmake to point the QT_QTFOO_LIBRARY targets at the imported targets
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# for the Qt libraries, so we get full handling of release and debug versions of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Qt libs and are flexible regarding the install location of Qt under Windows:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(QT_USE_IMPORTED_TARGETS TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#this line includes FindQt4.cmake, which searches the Qt library and headers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# TODO: we should check here that all necessary modules of Qt have been found, e.g. QtDBus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+find_package(Qt4 ${_REQ_STRING_KDE4})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# automoc4 (from kdesupport) is now required, Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+find_package(Automoc4 ${_REQ_STRING_KDE4})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# cmake 2.6.0 and automoc4 < 0.9.84 don't work right for -D flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (NOT AUTOMOC4_VERSION)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # the version macro was added for 0.9.84
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(AUTOMOC4_VERSION "0.9.83")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (NOT AUTOMOC4_VERSION)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(_automoc4_min_version "0.9.88")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro_ensure_version("${_automoc4_min_version}" "${AUTOMOC4_VERSION}" _automoc4_version_ok)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# for compatibility with KDE 4.0.x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_AUTOMOC_EXECUTABLE        "${AUTOMOC4_EXECUTABLE}" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Perl is not required for building KDE software, but we had that here since 4.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+find_package(Perl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(NOT PERL_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "Perl not found")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(NOT PERL_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# restore the original CMAKE_MODULE_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(CMAKE_MODULE_PATH ${_kde_cmake_module_path_back})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we check for Phonon not here, but further below, i.e. after KDELibsDependencies.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# has been loaded, which helps in the case that phonon is installed to the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# directory as kdelibs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# find_package(Phonon ${_REQ_STRING_KDE4})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Check that we really found everything.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If KDE4 was searched with REQUIRED, we error out with FATAL_ERROR if something wasn't found
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# already above in the other FIND_PACKAGE() calls.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If KDE4 was searched without REQUIRED and something in the FIND_PACKAGE() calls above wasn't found,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# then we get here and must check that everything has actually been found. If something is missing,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we must not fail with FATAL_ERROR, but only not set KDE4_FOUND.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(NOT QT4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "KDE4 not found, because Qt4 was not found")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   return()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(NOT QT4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(NOT AUTOMOC4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(${_REQ_STRING_KDE4_MESSAGE} "KDE4 not found, because Automoc4 not found.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      return()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else(NOT AUTOMOC4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if(NOT _automoc4_version_ok)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         message(${_REQ_STRING_KDE4_MESSAGE} "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least ${_automoc4_min_version}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         return()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif(NOT _automoc4_version_ok)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(NOT AUTOMOC4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# now we are sure we have everything we need
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+include (MacroLibrary)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+include (CheckCXXCompilerFlag)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+include (CheckCXXSourceCompiles)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# are we trying to compile kdelibs ? kdelibs_SOURCE_DIR comes from "project(kdelibs)" in kdelibs/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# then enter bootstrap mode
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(kdelibs_SOURCE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_kdeBootStrapping TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "Building kdelibs...")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else(kdelibs_SOURCE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_kdeBootStrapping FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(kdelibs_SOURCE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# helper macro, sets both the KDE4_FOO_LIBRARY and KDE4_FOO_LIBS variables to KDE4__foo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# It is used both in bootstrapping and in normal mode.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro(_KDE4_SET_LIB_VARIABLES _var _lib _prefix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_${_var}_LIBRARY ${_prefix}${_lib} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_${_var}_LIBS    ${_prefix}${_lib} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endmacro(_KDE4_SET_LIB_VARIABLES _var _lib _prefix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#######################  #now try to find some kde stuff  ################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_INCLUDE_DIR ${kdelibs_SOURCE_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(EXECUTABLE_OUTPUT_PATH ${kdelibs_BINARY_DIR}/bin )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(LIBRARY_OUTPUT_PATH               ${EXECUTABLE_OUTPUT_PATH} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      else (NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set(KDE4_KCFGC_EXECUTABLE             ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/kconfig_compiler )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set(KDE4_MEINPROC_EXECUTABLE          ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/meinproc4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif(NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(LIBRARY_OUTPUT_PATH               ${CMAKE_BINARY_DIR}/lib )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler${CMAKE_EXECUTABLE_SUFFIX}.shell )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen${CMAKE_EXECUTABLE_SUFFIX}.shell )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets${CMAKE_EXECUTABLE_SUFFIX}.shell )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_LIB_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # when building kdelibs, make the kcfg rules depend on the binaries...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_KCONFIG_COMPILER_DEP kconfig_compiler)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP kauth-policy-gen)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_MAKEKDEWIDGETS_DEP makekdewidgets)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_MEINPROC_EXECUTABLE_DEP meinproc4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_INSTALLED_VERSION_OK TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else (_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # ... but NOT otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_KCONFIG_COMPILER_DEP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_MAKEKDEWIDGETS_DEP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_MEINPROC_EXECUTABLE_DEP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # we don't want to be forced to set two paths into the build tree
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/bin )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # on win32 the install dir is determined on runtime not install time
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # KDELIBS_INSTALL_DIR and QT_INSTALL_DIR are used in KDELibsDependencies.cmake to setup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # kde install paths and library dependencies
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      get_filename_component(_DIR ${KDE4_KDECONFIG_EXECUTABLE} PATH )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      get_filename_component(KDE4_INSTALL_DIR ${_DIR} PATH )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      get_filename_component(QT_INSTALL_DIR ${_DIR} PATH )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # These files contain information about the installed kdelibs, Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   include(${kde_cmake_module_dir}/KDELibsDependencies.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   include(${kde_cmake_module_dir}/KDEPlatformProfile.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Check the version of KDE. It must be at least KDE_MIN_VERSION as set by the user.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # KDE_VERSION is set in KDELibsDependencies.cmake since KDE 4.0.x. Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Support for the new-style (>= 2.6.0) support for requiring some version of a package:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT KDE_MIN_VERSION)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (KDE4_FIND_VERSION_MAJOR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(KDE_MIN_VERSION "${KDE4_FIND_VERSION_MAJOR}.${KDE4_FIND_VERSION_MINOR}.${KDE4_FIND_VERSION_PATCH}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      else (KDE4_FIND_VERSION_MAJOR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(KDE_MIN_VERSION "4.0.0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (KDE4_FIND_VERSION_MAJOR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT KDE_MIN_VERSION)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #message(FATAL_ERROR "KDE_MIN_VERSION=${KDE_MIN_VERSION}  found ${KDE_VERSION} exact: -${KDE4_FIND_VERSION_EXACT}- version: -${KDE4_FIND_VERSION}-")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   macro_ensure_version( ${KDE_MIN_VERSION} ${KDE_VERSION} KDE4_INSTALLED_VERSION_OK )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # KDE4_LIB_INSTALL_DIR and KDE4_INCLUDE_INSTALL_DIR are set in KDELibsDependencies.cmake,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # use them to set the KDE4_LIB_DIR and KDE4_INCLUDE_DIR "public interface" variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_LIB_DIR ${KDE4_LIB_INSTALL_DIR} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_INCLUDE_DIR ${KDE4_INCLUDE_INSTALL_DIR} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This setting is currently not recorded in KDELibsDependencies.cmake:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   find_file(KDE4_PLASMA_OPENGL_FOUND plasma/glapplet.h PATHS ${KDE4_INCLUDE_DIR} NO_DEFAULT_PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Now include the file with the imported tools (executable targets).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This export-file is generated and installed by the toplevel CMakeLists.txt of kdelibs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Having the libs and tools in two separate files should help with cross compiling.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   include(${kde_cmake_module_dir}/KDELibs4ToolsTargets.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # get the build CONFIGURATIONS which were exported in this file, and use just the first
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # of them to get the location of the installed executables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   get_target_property(_importedConfigurations  ${KDE4_TARGET_PREFIX}kconfig_compiler IMPORTED_CONFIGURATIONS )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   list(GET _importedConfigurations 0 _firstConfig)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   get_target_property(KDE4_KCFGC_EXECUTABLE             ${KDE4_TARGET_PREFIX}kconfig_compiler    LOCATION_${_firstConfig})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   get_target_property(KDE4_MEINPROC_EXECUTABLE          ${KDE4_TARGET_PREFIX}meinproc4           LOCATION_${_firstConfig})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else(NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set(KDE4_KCFGC_EXECUTABLE             ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/kconfig_compiler )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set(KDE4_MEINPROC_EXECUTABLE          ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/meinproc4 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(NOT WINCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   get_target_property(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${KDE4_TARGET_PREFIX}kauth-policy-gen    LOCATION_${_firstConfig})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   get_target_property(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${KDE4_TARGET_PREFIX}makekdewidgets      LOCATION_${_firstConfig})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # allow searching cmake modules in all given kde install locations (KDEDIRS based)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   foreach(dir ${_data_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (apath "${dir}/cmake/modules")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (EXISTS "${apath}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set (included 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         string(TOLOWER "${apath}" _apath)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         # ignore already added pathes, case insensitive
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         foreach(adir ${CMAKE_MODULE_PATH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            string(TOLOWER "${adir}" _adir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            if ("${_adir}" STREQUAL "${_apath}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+               set (included 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            endif ("${_adir}" STREQUAL "${_apath}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         endforeach(adir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         if (NOT included)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            message(STATUS "Adding ${apath} to CMAKE_MODULE_PATH")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${apath}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         endif (NOT included)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (EXISTS "${apath}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endforeach(dir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This file contains the exported library target from kdelibs (new with cmake 2.6.x), e.g.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # the library target "kdeui" is exported as "KDE4__kdeui". The "KDE4__" is used as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # "namespace" to separate the imported targets from "normal" targets, it is stored in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # KDE4_TARGET_PREFIX, which is set in KDELibsDependencies.cmake .
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This export-file is generated and installed by the toplevel CMakeLists.txt of kdelibs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Include it to "import" the libraries from kdelibs into the current projects as targets.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This makes setting the _LIBRARY and _LIBS variables actually a bit superfluos, since e.g.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # the kdeui library could now also be used just as "KDE4__kdeui" and still have all their
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # dependent libraries handled correctly. But to keep compatibility and not to change
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # behaviour we set all these variables anyway as seen below. Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   include(${kde_cmake_module_dir}/KDELibs4LibraryTargets.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This one is for compatibility only:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_THREADWEAVER_LIBRARIES ${KDE4_TARGET_PREFIX}threadweaver )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Set the various KDE4_FOO_LIBRARY/LIBS variables.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# In bootstrapping mode KDE4_TARGET_PREFIX is empty, so e.g. KDE4_KDECORE_LIBRARY
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# will be simply set to "kdecore".
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Sorted by names:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KCMUTILS      kcmutils      "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KDE3SUPPORT   kde3support   "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KDECORE       kdecore       "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KDEUI         kdeui         "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KDEWEBKIT     kdewebkit     "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KDNSSD        kdnssd        "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KEMOTICONS    kemoticons    "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KFILE         kfile         "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KHTML         khtml         "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KIDLETIME     kidletime     "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KIO           kio           "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KJS           kjs           "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KJSAPI        kjsapi        "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KNEWSTUFF2    knewstuff2    "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KNEWSTUFF3    knewstuff3    "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KNOTIFYCONFIG knotifyconfig "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KPARTS        kparts        "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KPRINTUTILS   kprintutils   "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KROSSCORE     krosscore     "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KROSSUI       krossui       "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KTEXTEDITOR   ktexteditor   "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KUNITCONVERSION kunitconversion "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(KUTILS        kutils        "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(PLASMA        plasma        "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(SOLID         solid         "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+_kde4_set_lib_variables(THREADWEAVER  threadweaver  "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _kde4_set_lib_variables(KDEFAKES kdefakes "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _kde4_set_lib_variables(KDESU kdesu       "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _kde4_set_lib_variables(KPTY kpty         "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The nepomuk target does not always exist, since is is built conditionally. When bootstrapping
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we set it always anyways.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(_kdeBootStrapping  OR  TARGET ${KDE4_TARGET_PREFIX}nepomuk)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _kde4_set_lib_variables(NEPOMUK nepomuk "${KDE4_TARGET_PREFIX}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(_kdeBootStrapping  OR  TARGET ${KDE4_TARGET_PREFIX}nepomuk)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+################### try to find Phonon ############################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# we do this here instead of above together with the checks for Perl etc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# since FindPhonon.cmake also uses ${KDE4_LIB_INSTALL_DIR} to check for Phonon,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# which helps with finding the phonon installed as part of kdesupport:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# only make Phonon REQUIRED if KDE4 itself is REQUIRED
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+find_package(Phonon 4.3.80 ${_REQ_STRING_KDE4})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_PHONON_LIBRARY ${PHONON_LIBRARY})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_PHONON_LIBS ${PHONON_LIBS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_PHONON_INCLUDES ${PHONON_INCLUDES})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(NOT PHONON_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "KDE4 not found, because Phonon was not found")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   return()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(NOT PHONON_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#####################  provide some options   ##########################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option(KDE4_BUILD_TESTS  "Build the tests" ON)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option(KDE4_ENABLE_HTMLHANDBOOK  "Create targets htmlhandbook for creating the html versions of the docbook docs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_SERIALIZE_TOOL "" CACHE STRING "Tool to serialize resource-intensive commands in parallel builds")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# if CMake 2.6.3 or above is used, provide an option which should be used by other KDE packages
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# whether to install a CMake FooConfig.cmake into lib/foo/cmake/ or /lib/cmake/foo/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# (with 2.6.3 and above also lib/cmake/foo/ is supported):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   option(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR "Prefer to install the <package>Config.cmake files to lib/cmake/<package> instead to lib/<package>/cmake" TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR  FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Position-Independent-Executable is a feature of Binutils, Libc, and GCC that creates an executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# which is something between a shared library and a normal executable.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Programs compiled with these features appear as ?shared object? with the file command.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# info from "http://www.linuxfromscratch.org/hlfs/view/unstable/glibc/chapter02/pie.html"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option(KDE4_ENABLE_FPIE  "Enable platform supports PIE linking")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/apps/cmake/modules")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   find_package(KDEWin REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   option(KDE4_ENABLE_UAC_MANIFEST "add manifest to make vista uac happy" OFF)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (KDE4_ENABLE_UAC_MANIFEST)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      find_program(KDE4_MT_EXECUTABLE mt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         PATHS ${KDEWIN_INCLUDE_DIR}/../bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         NO_DEFAULT_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (KDE4_MT_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         message(STATUS "Found KDE manifest tool at ${KDE4_MT_EXECUTABLE} ")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      else (KDE4_MT_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         message(STATUS "KDE manifest tool not found, manifest generating for Windows Vista disabled")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set (KDE4_ENABLE_UAC_MANIFEST OFF)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (KDE4_MT_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (KDE4_ENABLE_UAC_MANIFEST)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#####################  some more settings   ##########################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if( KDE4_ENABLE_FINAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   add_definitions(-DKDE_USE_FINAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(KDE4_ENABLE_FINAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(KDE4_SERIALIZE_TOOL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # parallel build with many meinproc invocations can consume a huge amount of memory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_MEINPROC_EXECUTABLE ${KDE4_SERIALIZE_TOOL} ${KDE4_MEINPROC_EXECUTABLE})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(KDE4_SERIALIZE_TOOL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If we are building ! kdelibs, check where kdelibs are installed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If they are installed in a directory which contains "lib64", we default to "64" for LIB_SUFFIX,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# so the current project will by default also go into lib64.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The same for lib32. Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(_Init_LIB_SUFFIX "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if ("${KDE4_LIB_DIR}" MATCHES lib64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_Init_LIB_SUFFIX 64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif ("${KDE4_LIB_DIR}" MATCHES lib64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if ("${KDE4_LIB_DIR}" MATCHES lib32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_Init_LIB_SUFFIX 32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif ("${KDE4_LIB_DIR}" MATCHES lib32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(LIB_SUFFIX "${_Init_LIB_SUFFIX}" CACHE STRING "Define suffix of directory name (32/64)" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+########## the following are directories where stuff will be installed to  ###########
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# this has to be after find_xxx() block above, since there KDELibsDependencies.cmake is included
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# which contains the install dirs from kdelibs, which are reused below
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(LIB_INSTALL_DIR      "lib${LIB_SUFFIX}" )            # The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(EXEC_INSTALL_PREFIX  "" )        # Base directory for executables and libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SHARE_INSTALL_PREFIX "share" )   # Base directory for files which go to share/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(BIN_INSTALL_DIR      "bin"   )   # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SBIN_INSTALL_DIR     "sbin"  )   # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(LIBEXEC_INSTALL_DIR  "${BIN_INSTALL_DIR}"          ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(INCLUDE_INSTALL_DIR  "include"                     ) # The subdirectory to the header prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(PLUGIN_INSTALL_DIR       "lib${LIB_SUFFIX}/kde4"   ) #                "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(IMPORTS_INSTALL_DIR       "${PLUGIN_INSTALL_DIR}/imports"   ) # "The subdirectory relative to the install prefix where imports will be installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CONFIG_INSTALL_DIR       "share/config"            ) # The config file install dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(DATA_INSTALL_DIR         "share/apps"              ) # The parent directory where applications can install their data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(HTML_INSTALL_DIR         "share/doc/HTML"          ) # The HTML install dir for documentation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(ICON_INSTALL_DIR         "share/icons"             ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KCFG_INSTALL_DIR         "share/config.kcfg"       ) # The install dir for kconfig files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(LOCALE_INSTALL_DIR       "share/locale"            ) # The install dir for translations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(MIME_INSTALL_DIR         "share/mimelnk"           ) # The install dir for the mimetype desktop files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SERVICES_INSTALL_DIR     "share/kde4/services"     ) # The install dir for service (desktop, protocol, ...) files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SOUND_INSTALL_DIR        "share/sounds"            ) # The install dir for sound files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(TEMPLATES_INSTALL_DIR    "share/templates"         ) # The install dir for templates (Create new file...)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(WALLPAPER_INSTALL_DIR    "share/wallpapers"        ) # The install dir for wallpapers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(DEMO_INSTALL_DIR         "share/demos"             ) # The install dir for demos
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(AUTOSTART_INSTALL_DIR    "share/autostart"         ) # The install dir for autostart files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(XDG_APPS_INSTALL_DIR      "share/applications/kde4"   ) # The XDG apps dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(XDG_MIME_INSTALL_DIR      "share/mime/packages"       ) # The install dir for the xdg mimetypes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(SYSCONF_INSTALL_DIR       "etc"                       ) # The sysconfig install dir (default /etc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(MAN_INSTALL_DIR           "share/man"                 ) # The man install dir (default ${SHARE_INSTALL_PREFIX}/man/)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(INFO_INSTALL_DIR          "share/info"                ) # The info install dir (default ${SHARE_INSTALL_PREFIX}/info)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The dbus interfaces install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services"     ) # The dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(DBUS_SYSTEM_SERVICES_INSTALL_DIR "share/dbus-1/system-services"     ) # The dbus system services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/system-services)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This macro implements some very special logic how to deal with the cache.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # By default the various install locations inherit their value from their "parent" variable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX .
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # This would work completely without using the cache.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # But if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # the cache, otherwise it will be forgotten on the next cmake run.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Once a variable is in the cache, it doesn't depend on its "parent" variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # anymore and you can only change it by editing it directly.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # this macro helps in this regard, because as long as you don't set one of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # variables explicitly to some location, it will always calculate its value from its
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # additionally if installing to the same location as kdelibs, the other install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # directories are reused from the installed kdelibs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   macro(_SET_FANCY _var _value _comment)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(predefinedvalue "${_value}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(predefinedvalue "${KDE4_${_var}}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (NOT DEFINED ${_var})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(${_var} ${predefinedvalue})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      else (NOT DEFINED ${_var})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(${_var} "${${_var}}" CACHE PATH "${_comment}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (NOT DEFINED ${_var})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endmacro(_SET_FANCY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(BUNDLE_INSTALL_DIR "/Applications/KDE4" CACHE PATH "Directory where application bundles will be installed to on OSX" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(EXEC_INSTALL_PREFIX  "${CMAKE_INSTALL_PREFIX}"                 "Base directory for executables and libraries")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share"           "Base directory for files which go to share/")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(BIN_INSTALL_DIR      "${EXEC_INSTALL_PREFIX}/bin"              "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SBIN_INSTALL_DIR     "${EXEC_INSTALL_PREFIX}/sbin"             "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(LIB_INSTALL_DIR      "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(LIBEXEC_INSTALL_DIR  "${LIB_INSTALL_DIR}/kde4/libexec"         "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/kde4/libexec)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(INCLUDE_INSTALL_DIR  "${CMAKE_INSTALL_PREFIX}/include"         "The subdirectory to the header prefix")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(PLUGIN_INSTALL_DIR       "${LIB_INSTALL_DIR}/kde4"                "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(IMPORTS_INSTALL_DIR       "${PLUGIN_INSTALL_DIR}/imports"                "The subdirectory relative to the install prefix where imports will be installed")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(CONFIG_INSTALL_DIR       "${SHARE_INSTALL_PREFIX}/config"         "The config file install dir")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(DATA_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/apps"           "The parent directory where applications can install their data")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(HTML_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/doc/HTML"       "The HTML install dir for documentation")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(ICON_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/icons"          "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(KCFG_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/config.kcfg"    "The install dir for kconfig files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(LOCALE_INSTALL_DIR       "${SHARE_INSTALL_PREFIX}/locale"         "The install dir for translations")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(MIME_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/mimelnk"        "The install dir for the mimetype desktop files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SERVICES_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/kde4/services"  "The install dir for service (desktop, protocol, ...) files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SOUND_INSTALL_DIR        "${SHARE_INSTALL_PREFIX}/sounds"         "The install dir for sound files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(TEMPLATES_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/templates"      "The install dir for templates (Create new file...)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(WALLPAPER_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/wallpapers"     "The install dir for wallpapers")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(DEMO_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/demos"          "The install dir for demos")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update"       "The kconf_update install dir")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(AUTOSTART_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/autostart"      "The install dir for autostart files")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(XDG_APPS_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/applications/kde4"         "The XDG apps dir")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories"      "The XDG directory")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(XDG_MIME_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/mime/packages"  "The install dir for the xdg mimetypes")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(SYSCONF_INSTALL_DIR      "${CMAKE_INSTALL_PREFIX}/etc"            "The sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(MAN_INSTALL_DIR          "${SHARE_INSTALL_PREFIX}/man"            "The man install dir (default ${SHARE_INSTALL_PREFIX}/man/)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(INFO_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/info"           "The info install dir (default ${SHARE_INSTALL_PREFIX}/info)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(DBUS_INTERFACES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The dbus interfaces install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(DBUS_SERVICES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/services"     "The dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _set_fancy(DBUS_SYSTEM_SERVICES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/system-services"     "The dbus system services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/system-services)")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# For more documentation see above.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Later on it will be possible to extend this for installing OSX frameworks
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The COMPONENT Devel argument has the effect that static libraries belong to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# "Devel" install component. If we use this also for all install() commands
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# for header files, it will be possible to install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   -everything: make install OR cmake -P cmake_install.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This can then also be used for packaging with cpack.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(INSTALL_TARGETS_DEFAULT_ARGS  RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                  LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                  ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# on the Mac support an extra install directory for application bundles starting with cmake 2.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(INSTALL_TARGETS_DEFAULT_ARGS  ${INSTALL_TARGETS_DEFAULT_ARGS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                               BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+##############  add some more default search paths  ###############
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# the KDE4_xxx_INSTALL_DIR variables are empty when building kdelibs itself
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# and otherwise point to the kde4 install dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                              "${KDE4_INCLUDE_INSTALL_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                              "${KDE4_BIN_INSTALL_DIR}" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                              "${KDE4_LIB_INSTALL_DIR}" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# under Windows dlls may be also installed in bin/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if(WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                "${_CMAKE_INSTALL_DIR}/bin"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                "${CMAKE_INSTALL_PREFIX}/bin" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+######################################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#  and now the platform specific stuff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+######################################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Set a default build type for single-configuration
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# CMake generators if no build type is set.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_BUILD_TYPE RelWithDebInfo)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(CYGWIN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(FATAL_ERROR "Cygwin is NOT supported, use mingw or MSVC to build KDE4.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(CYGWIN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # limit win32 packaging to kdelibs at now
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # don't know if package name, version and notes are always available
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      find_package(KDEWIN_Packager)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (KDEWIN_PACKAGER_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         kdewin_packager("kdelibs" "${KDE_VERSION}" "KDE base library" "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (KDEWIN_PACKAGER_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      include(Win32Macros)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      addExplorerWrapper("kdelibs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_PLATFORM_INCLUDE_DIRS ${KDEWIN_INCLUDES})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # if we are compiling kdelibs, add KDEWIN_LIBRARIES explicitly,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # otherwise they come from KDELibsDependencies.cmake, Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN_LIBRARIES} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (_kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # we prefer to use a different postfix for debug libs only on Windows
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # does not work atm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_DEBUG_POSTFIX "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # windows, microsoft compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( _KDE4_PLATFORM_DEFINITIONS -DKDE_FULL_TEMPLATE_EXPORT_INSTANTIATION -DWIN32_LEAN_AND_MEAN )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # C4250: 'class1' : inherits 'class2::member' via dominance
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4250" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4251" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # C4396: 'identifier' : 'function' the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4396" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # to avoid a lot of deprecated warnings
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      add_definitions( -D_CRT_SECURE_NO_DEPRECATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                       -D_CRT_SECURE_NO_WARNINGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                       -D_CRT_NONSTDC_NO_DEPRECATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                       -D_SCL_SECURE_NO_WARNINGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                       )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # 'identifier' : no suitable definition provided for explicit template instantiation request
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4661" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # for visual studio IDE set the path correctly for custom commands
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # maybe under windows bat-files should be generated for running apps during the build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(MSVC_IDE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     get_filename_component(PERL_LOCATION "${PERL_EXECUTABLE}" PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     file(TO_NATIVE_PATH "${PERL_LOCATION}" PERL_PATH_WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     file(TO_NATIVE_PATH "${QT_BINARY_DIR}" QT_BIN_DIR_WINDOWS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     set(CMAKE_MSVCIDE_RUN_PATH "${PERL_PATH_WINDOWS}\;${QT_BIN_DIR_WINDOWS}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       CACHE STATIC "MSVC IDE Run path" FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(MSVC_IDE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # we don't support anything below w2k and all winapi calls are unicodes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0501 -DUNICODE" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# setup default RPATH/install_name handling, may be overridden by KDE4_HANDLE_RPATH_FOR_EXECUTABLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# It sets up to build with full RPATH. When installing, RPATH will be changed to the LIB_INSTALL_DIR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# and all link directories which are not inside the current build dir.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( _KDE4_PLATFORM_INCLUDE_DIRS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # the rest is RPATH handling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # here the defaults are set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # which are partly overwritten in kde4_handle_rpath_for_library()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # and kde4_handle_rpath_for_executable(), both located in KDE4Macros.cmake, Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else (APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of the standard system link
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # directories listed in CMAKE_{PLATFORM,C,CXX}_IMPLICIT_LINK_DIRECTORIES) and use the RPATH figured out by cmake when compiling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemPlatformLibDir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemCLibDir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemCxxLibDir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif("${_isSystemPlatformLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_SKIP_BUILD_RPATH FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (Q_WS_X11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Done by FindQt4.cmake already
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #find_package(X11 REQUIRED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # UNIX has already set _KDE4_PLATFORM_INCLUDE_DIRS, so append
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_KDE4_PLATFORM_INCLUDE_DIRS ${_KDE4_PLATFORM_INCLUDE_DIRS} ${X11_INCLUDE_DIR} )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (Q_WS_X11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This will need to be modified later to support either Qt/X11 or Qt/Mac builds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set ( _KDE4_PLATFORM_DEFINITIONS -D__APPLE_KDE__ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # we need to set MACOSX_DEPLOYMENT_TARGET to (I believe) at least 10.2 or maybe 10.3 to allow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # -undefined dynamic_lookup; in the future we should do this programmatically
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # hmm... why doesn't this work?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set (ENV{MACOSX_DEPLOYMENT_TARGET} 10.3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # "-undefined dynamic_lookup" means we don't care about missing symbols at link-time by default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # this is bad, but unavoidable until there is the equivalent of libtool -no-undefined implemented
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # or perhaps it already is, and I just don't know where to look  ;)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set (CMAKE_SHARED_LINKER_FLAGS "-single_module -multiply_defined suppress ${CMAKE_SHARED_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set (CMAKE_MODULE_LINKER_FLAGS "-multiply_defined suppress ${CMAKE_MODULE_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  #set(CMAKE_SHARED_LINKER_FLAGS "-single_module -undefined dynamic_lookup -multiply_defined suppress")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  #set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup -multiply_defined suppress")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # we profile...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  if(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # removed -Os, was there a special reason for using -Os instead of -O2 ?, Alex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  # optimization flags are set below for the various build types
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set (CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (APPLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_MODULE_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_EXE_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # we profile...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (CMAKE_C_COMPILER MATCHES "icc")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (CMAKE_C_COMPILER MATCHES "icc")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} ")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   check_cxx_source_compiles("
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <sys/types.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Check that off_t can represent 2**63 - 1 correctly.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    since some C++ compilers masquerading as C compilers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    incorrectly reject 9223372036854775807.  */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  int main() { return 0; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+" _OFFT_IS_64BIT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT _OFFT_IS_64BIT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} -D_FILE_OFFSET_BITS=64")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT _OFFT_IS_64BIT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (UNIX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+############################################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compiler specific settings
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+############################################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# this macro is for internal use only.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro(KDE_CHECK_FLAG_EXISTS FLAG VAR DOC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(NOT ${VAR} MATCHES "${FLAG}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(${VAR} "${${VAR}} ${FLAG}" CACHE STRING "Flags used by the linker during ${DOC} builds." FORCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(NOT ${VAR} MATCHES "${FLAG}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endmacro(KDE_CHECK_FLAG_EXISTS FLAG VAR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set (KDE4_ENABLE_EXCEPTIONS -EHsc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Qt disables the native wchar_t type, do it too to avoid linking issues
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zc:wchar_t-" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # make sure that no header adds libcmt by default using #pragma comment(lib, "libcmt.lib") as done by mfc/afx.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "Release with Debug Info")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELEASE "release")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "release minsize")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde_check_flag_exists("/NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtd" CMAKE_EXE_LINKER_FLAGS_DEBUG "debug")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This macro is for internal use only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Return the directories present in gcc's include path.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(${_result})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  set(_gccOutput)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  execute_process(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                  ERROR_VARIABLE _gccOutput
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                  OUTPUT_VARIABLE _gccStdout )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  if( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    SET(${_result} ${CMAKE_MATCH_1})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    STRING(REPLACE "\n" " " ${_result} "${${_result}}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    SEPARATE_ARGUMENTS(${_result})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+  ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES Clang)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${_dirs})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES Clang)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (CMAKE_COMPILER_IS_GNUCXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${_dirs})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set (KDE4_ENABLE_EXCEPTIONS "-fexceptions -UQT_NO_EXCEPTIONS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Select flags.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # As of Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # This should not be needed, as it is also part of _KDE4_PLATFORM_DEFINITIONS below.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # It is kept here nonetheless both for backwards compatibility in case one does not use add_definitions(${KDE4_DEFINITIONS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # and also because it is/was needed by glibc for snprintf to be available when building C files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     # See commit 4a44862b2d178c1d2e1eb4da90010d19a1e4a42c.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     add_definitions (-D_DEFAULT_SOURCE -D_BSD_SOURCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # gcc under Windows
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (MINGW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (MINGW)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   check_cxx_compiler_flag(-fPIE HAVE_FPIE_SUPPORT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(KDE4_ENABLE_FPIE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       if(HAVE_FPIE_SUPPORT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set (KDE4_CXX_FPIE_FLAGS "-fPIE")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set (KDE4_PIE_LDFLAGS "-pie")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       else(HAVE_FPIE_SUPPORT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        message(STATUS "Your compiler doesn't support the PIE flag")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       endif(HAVE_FPIE_SUPPORT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(KDE4_ENABLE_FPIE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   check_cxx_compiler_flag(-Woverloaded-virtual __KDE_HAVE_W_OVERLOADED_VIRTUAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(__KDE_HAVE_W_OVERLOADED_VIRTUAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(__KDE_HAVE_W_OVERLOADED_VIRTUAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # visibility support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_GCC_VISIBILITY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #set( __KDE_HAVE_GCC_VISIBILITY ${__KDE_HAVE_GCC_VISIBILITY} CACHE BOOL "GCC support for hidden visibility")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set( __KDE_HAVE_GCC_VISIBILITY 0 CACHE BOOL "GCC support for hidden visibility")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "__KDE_HAVE_GCC_VISIBILITY=${__KDE_HAVE_GCC_VISIBILITY}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # get the gcc version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} --version OUTPUT_VARIABLE _gcc_version_info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT _gcc_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      string (REGEX MATCH ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${gcc_on_macos}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (gcc_on_macos)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (gcc_on_macos)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT _gcc_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (_gcc_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      macro_ensure_version("4.1.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      macro_ensure_version("4.2.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      macro_ensure_version("4.3.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (_gcc_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # save a little by making local statics not threadsafe
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # ### do not enable it for older compilers, see
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # ### http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31806
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (GCC_IS_NEWER_THAN_4_3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (GCC_IS_NEWER_THAN_4_3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (GCC_IS_NEWER_THAN_4_1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} -v OUTPUT_VARIABLE _gcc_alloc_info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (GCC_IS_NEWER_THAN_4_1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      # first check if we can compile a Qt application
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(_source "#include <QtCore/QtGlobal>\n int main() \n {\n return 0; \n } \n")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_application.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      file(WRITE "${_source_file}" "${_source}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      try_compile(_basic_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if(_basic_compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            # now ready to check for visibility=hidden
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            set (KDE4_C_FLAGS "-fvisibility=hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            set(_source "#include <QtCore/QtGlobal>\n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            file(WRITE "${_source_file}" "${_source}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            if(NOT _compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#               message("${_compile_output_var}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#               message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation (try passing --reduce-exports to configure).")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#            endif(NOT _compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       else(_basic_compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         message("${_compile_output_var}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         message(FATAL_ERROR "Unable to compile a basic Qt application. Qt has not been found correctly.")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       endif(_basic_compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      if (GCC_IS_NEWER_THAN_4_2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -fvisibility-inlines-hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      endif (GCC_IS_NEWER_THAN_4_2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    message(WARNING "Turning off hidden visibility")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set (__KDE_HAVE_GCC_VISIBILITY 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (CMAKE_COMPILER_IS_GNUCXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Detect Clang the proper way (= including AppleClang)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${_dirs})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Note that exceptions are enabled by default when building with clang. That
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # is, -fno-exceptions is not set in CMAKE_CXX_FLAGS below. This is because a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # lot of code in different KDE modules ends up including code that throws
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # exceptions. Most (or all) of the occurrences are in template code that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # never gets instantiated. Contrary to GCC, ICC and MSVC, clang (most likely
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # rightfully) complains about that. Trying to work around the issue by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # passing -fdelayed-template-parsing brings other problems, as noted in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # http://lists.kde.org/?l=kde-core-devel&m=138157459706783&w=2.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # The generated code will be slightly bigger, but there is no way to avoid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_ENABLE_EXCEPTIONS "-fexceptions -UQT_NO_EXCEPTIONS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Select flags.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-common -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #set(KDE4_C_FLAGS    "-fvisibility=hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-common -Werror=return-type")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_C_FLAGS    "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # At least kdepim exports one function with C linkage that returns a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # QString in a plugin, but clang does not like that.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_CXX_FPIE_FLAGS "-fPIE")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_PIE_LDFLAGS    "-pie")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (CMAKE_SYSTEM_NAME STREQUAL GNU)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(STATUS "Building with Clang but no hidden visibility")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(__KDE_HAVE_GCC_VISIBILITY FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   set(_source "#include <QtCore/QtGlobal>\n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   file(WRITE "${_source_file}" "${_source}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   if(NOT _compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#       message("${_compile_output_var}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#       message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation (try passing --reduce-exports to configure).")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   endif(NOT _compile_result)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (CMAKE_C_COMPILER MATCHES "icc")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # Select flags.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUG          "-O2 -g -fno-inline -noalign")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g -fno-inline -noalign")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG -DQT_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUG            "-O2 -g -fno-inline -noalign")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS_DEBUGFULL        "-g -fno-inline -noalign")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -ansi -Wall -w1 -Wpointer-arith -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -w1 -Wpointer-arith -fno-exceptions -fno-common")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # visibility support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(__KDE_HAVE_ICC_VISIBILITY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_ICC_VISIBILITY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   if (__KDE_HAVE_ICC_VISIBILITY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#   endif (__KDE_HAVE_ICC_VISIBILITY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (CMAKE_C_COMPILER MATCHES "icc")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+###########    end of platform specific stuff  ##########################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# KDE4Macros.cmake contains all the KDE specific macros
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+include(${kde_cmake_module_dir}/KDE4Macros.cmake)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# decide whether KDE4 has been found
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_FOUND FALSE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (KDE4_INCLUDE_DIR AND KDE4_LIB_DIR AND KDE4_KCFGC_EXECUTABLE AND KDE4_INSTALLED_VERSION_OK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4_FOUND TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(KDE4Internal_FOUND TRUE) # for feature_summary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (KDE4_INCLUDE_DIR AND KDE4_LIB_DIR AND KDE4_KCFGC_EXECUTABLE AND KDE4_INSTALLED_VERSION_OK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro (KDE4_PRINT_RESULTS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   # inside kdelibs the include dir and lib dir are internal, not "found"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT _kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       if(KDE4_INCLUDE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          message(STATUS "Found KDE 4.12 include dir: ${KDE4_INCLUDE_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       else(KDE4_INCLUDE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          message(STATUS "ERROR: unable to find the KDE 4 headers")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       endif(KDE4_INCLUDE_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       if(KDE4_LIB_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          message(STATUS "Found KDE 4.12 library dir: ${KDE4_LIB_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       else(KDE4_LIB_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+          message(STATUS "ERROR: unable to find the KDE 4 core library")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       endif(KDE4_LIB_DIR)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT _kdeBootStrapping)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(KDE4_KCFGC_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(STATUS "Found the KDE4 kconfig_compiler preprocessor: ${KDE4_KCFGC_EXECUTABLE}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else(KDE4_KCFGC_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(STATUS "Didn't find the KDE4 kconfig_compiler preprocessor")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(KDE4_KCFGC_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if(AUTOMOC4_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(STATUS "Found automoc4: ${AUTOMOC4_EXECUTABLE}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   else(AUTOMOC4_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+      message(STATUS "Didn't find automoc4")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif(AUTOMOC4_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endmacro (KDE4_PRINT_RESULTS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (KDE4Internal_FIND_REQUIRED AND NOT KDE4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   #bail out if something wasn't found
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde4_print_results()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT KDE4_INSTALLED_VERSION_OK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     message(FATAL_ERROR "ERROR: the installed kdelibs version ${KDE_VERSION} is too old, at least version ${KDE_MIN_VERSION} is required")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT KDE4_INSTALLED_VERSION_OK)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   if (NOT KDE4_KCFGC_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     message(FATAL_ERROR "ERROR: could not detect a usable kconfig_compiler")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   endif (NOT KDE4_KCFGC_EXECUTABLE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   message(FATAL_ERROR "ERROR: could NOT find everything required for compiling KDE 4 programs")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (KDE4Internal_FIND_REQUIRED AND NOT KDE4_FOUND)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (NOT KDE4Internal_FIND_QUIETLY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   kde4_print_results()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (NOT KDE4Internal_FIND_QUIETLY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#add the found Qt and KDE include directories to the current include path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#the ${KDE4_INCLUDE_DIR}/KDE directory is for forwarding includes, eg. #include <KMainWindow>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_INCLUDES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   ${KDE4_INCLUDE_DIR}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   ${KDE4_INCLUDE_DIR}/KDE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   ${KDE4_PHONON_INCLUDES}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   ${QT_INCLUDES}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   ${_KDE4_PLATFORM_INCLUDE_DIRS}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Used by kdebug.h: the "toplevel dir" is one level above CMAKE_SOURCE_DIR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+get_filename_component(_KDE4_CMAKE_TOPLEVEL_DIR "${CMAKE_SOURCE_DIR}/.." ABSOLUTE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+string(LENGTH "${_KDE4_CMAKE_TOPLEVEL_DIR}" _KDE4_CMAKE_TOPLEVEL_DIR_LENGTH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set(KDE4_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=${_KDE4_CMAKE_TOPLEVEL_DIR_LENGTH})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if (NOT _kde4_uninstall_rule_created)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   set(_kde4_uninstall_rule_created TRUE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   configure_file("${kde_cmake_module_dir}/kde4_cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" @ONLY)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif (NOT _kde4_uninstall_rule_created)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+endif(NOT KDE4_FOUND)
</span></pre><pre style='margin:0'>

</pre>