diff options
Diffstat (limited to 'attic/modules')
| -rw-r--r-- | attic/modules/FindKDE4Internal.cmake | 1418 | ||||
| -rw-r--r-- | attic/modules/KDE4Defaults.cmake | 38 | ||||
| -rw-r--r-- | attic/modules/KDE4Macros.cmake | 1356 | ||||
| -rw-r--r-- | attic/modules/kde4init_dummy.cpp.in | 3 | ||||
| -rw-r--r-- | attic/modules/kde4init_win32lib_dummy.cpp.in | 5 | ||||
| -rw-r--r-- | attic/modules/kde4uic.cmake | 56 | 
6 files changed, 0 insertions, 2876 deletions
| diff --git a/attic/modules/FindKDE4Internal.cmake b/attic/modules/FindKDE4Internal.cmake deleted file mode 100644 index 7960061b..00000000 --- a/attic/modules/FindKDE4Internal.cmake +++ /dev/null @@ -1,1418 +0,0 @@ -# - Find the KDE4 include and library dirs, KDE preprocessors and define a some macros -# -# This module defines the following variables: -# -#  KDE4_FOUND               - set to TRUE if everything required for building KDE software has been found -# -#  KDE4_DEFINITIONS         - compiler definitions required for compiling KDE software -#  KDE4_INCLUDE_DIR         - the KDE 4 include directory -#  KDE4_INCLUDES            - all include directories required for KDE, i.e. -#                             KDE4_INCLUDE_DIR, but also the Qt4 include directories -#                             and other platform specific include directories -#  KDE4_LIB_DIR             - the directory where the KDE libraries are installed, -#                             intended to be used with LINK_DIRECTORIES(). In general, this is not necessary. -#  KDE4_LIBEXEC_INSTALL_DIR - the directory where libexec executables from kdelibs are installed -#  KDE4_BIN_INSTALL_DIR     - the directory where executables from kdelibs are installed -#  KDE4_SBIN_INSTALL_DIR    - the directory where system executables from kdelibs are installed -#  KDE4_DATA_INSTALL_DIR    - the parent directory where kdelibs applications install their data -#  KDE4_HTML_INSTALL_DIR    - the directory where HTML documentation from kdelibs is installed -#  KDE4_CONFIG_INSTALL_DIR  - the directory where config files from kdelibs are installed -#  KDE4_ICON_INSTALL_DIR    - the directory where icons from kdelibs are -#  KDE4_IMPORTS_INSTALL_DIR - the directory where imports from kdelibs are -#  KDE4_KCFG_INSTALL_DIR    - the directory where kconfig files from kdelibs are installed -#  KDE4_LOCALE_INSTALL_DIR  - the directory where translations from kdelibs are installed -#  KDE4_MIME_INSTALL_DIR    - the directory where mimetype desktop files from kdelibs are installed -#  KDE4_SOUND_INSTALL_DIR   - the directory where sound files from kdelibs are installed -#  KDE4_TEMPLATES_INSTALL_DIR     - the directory where templates (Create new file...) from kdelibs are installed -#  KDE4_WALLPAPER_INSTALL_DIR     - the directory where wallpapers from kdelibs are installed -#  KDE4_KCONF_UPDATE_INSTALL_DIR  - the directory where kconf_update files from kdelibs are installed -#  KDE4_AUTOSTART_INSTALL_DIR     - the directory where autostart from kdelibs are installed -#  KDE4_XDG_APPS_INSTALL_DIR      - the XDG apps dir from kdelibs -#  KDE4_XDG_DIRECTORY_INSTALL_DIR - the XDG directory from kdelibs -#  KDE4_SYSCONF_INSTALL_DIR       - the directory where sysconfig files from kdelibs are installed -#  KDE4_MAN_INSTALL_DIR           - the directory where man pages from kdelibs are installed -#  KDE4_INFO_INSTALL_DIR          - the directory where info files from kdelibs are installed -#  KDE4_DBUS_INTERFACES_DIR       - the directory where dbus interfaces from kdelibs are installed -#  KDE4_DBUS_SERVICES_DIR         - the directory where dbus service files from kdelibs are installed -# -# The following variables are defined for the various tools required to -# compile KDE software: -# -#  KDE4_KCFGC_EXECUTABLE    - the kconfig_compiler executable -#  KDE4_AUTOMOC_EXECUTABLE  - the kde4automoc executable, deprecated, use AUTOMOC4_EXECUTABLE instead -#  KDE4_MEINPROC_EXECUTABLE - the meinproc4 executable -#  KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets executable -# -# The following variables point to the location of the KDE libraries, -# but shouldn't be used directly: -# -#  KDE4_KDECORE_LIBRARY     - the kdecore library -#  KDE4_KDEUI_LIBRARY       - the kdeui library -#  KDE4_KIO_LIBRARY         - the kio library -#  KDE4_KPARTS_LIBRARY      - the kparts library -#  KDE4_KUTILS_LIBRARY      - the kutils library -#  KDE4_KEMOTICONS_LIBRARY  - the kemoticons library -#  KDE4_KIDLETIME_LIBRARY   - the kidletime library -#  KDE4_KCMUTILS_LIBRARY    - the kcmutils library -#  KDE4_KPRINTUTILS_LIBRARY - the kprintutils library -#  KDE4_KDE3SUPPORT_LIBRARY - the kde3support library -#  KDE4_KFILE_LIBRARY       - the kfile library -#  KDE4_KHTML_LIBRARY       - the khtml library -#  KDE4_KJS_LIBRARY         - the kjs library -#  KDE4_KJSAPI_LIBRARY      - the kjs public api library -#  KDE4_KNEWSTUFF2_LIBRARY  - the knewstuff2 library -#  KDE4_KNEWSTUFF3_LIBRARY  - the knewstuff3 library -#  KDE4_KDNSSD_LIBRARY      - the kdnssd library -#  KDE4_PHONON_LIBRARY      - the phonon library -#  KDE4_THREADWEAVER_LIBRARY- the threadweaver library -#  KDE4_SOLID_LIBRARY       - the solid library -#  KDE4_KNOTIFYCONFIG_LIBRARY- the knotifyconfig library -#  KDE4_KROSSCORE_LIBRARY   - the krosscore library -#  KDE4_KTEXTEDITOR_LIBRARY - the ktexteditor library -#  KDE4_NEPOMUK_LIBRARY     - the nepomuk library -#  KDE4_PLASMA_LIBRARY      - the plasma library -#  KDE4_KUNITCONVERSION_LIBRARY - the kunitconversion library -#  KDE4_KDEWEBKIT_LIBRARY   - the kdewebkit library -# -#  KDE4_PLASMA_OPENGL_FOUND  - TRUE if the OpenGL support of Plasma has been found, NOTFOUND otherwise -# -# Compared to the variables above, the following variables -# also contain all of the depending libraries, so the variables below -# should be used instead of the ones above: -# -#  KDE4_KDECORE_LIBS          - the kdecore library and all depending libraries -#  KDE4_KDEUI_LIBS            - the kdeui library and all depending libraries -#  KDE4_KIO_LIBS              - the kio library and all depending libraries -#  KDE4_KPARTS_LIBS           - the kparts library and all depending libraries -#  KDE4_KUTILS_LIBS           - the kutils library and all depending libraries -#  KDE4_KEMOTICONS_LIBS       - the kemoticons library and all depending libraries -#  KDE4_KIDLETIME_LIBS        - the kidletime library and all depending libraries -#  KDE4_KCMUTILS_LIBS         - the kcmutils library and all depending libraries -#  KDE4_KPRINTUTILS_LIBS      - the kprintutils library and all depending libraries -#  KDE4_KDE3SUPPORT_LIBS      - the kde3support library and all depending libraries -#  KDE4_KFILE_LIBS            - the kfile library and all depending libraries -#  KDE4_KHTML_LIBS            - the khtml library and all depending libraries -#  KDE4_KJS_LIBS              - the kjs library and all depending libraries -#  KDE4_KJSAPI_LIBS           - the kjs public api library and all depending libraries -#  KDE4_KNEWSTUFF2_LIBS       - the knewstuff2 library and all depending libraries -#  KDE4_KNEWSTUFF3_LIBS       - the knewstuff3 library and all depending libraries -#  KDE4_KDNSSD_LIBS           - the kdnssd library and all depending libraries -#  KDE4_KDESU_LIBS            - the kdesu library and all depending libraries -#  KDE4_KPTY_LIBS             - the kpty library and all depending libraries -#  KDE4_PHONON_LIBS           - the phonon library and all depending librairies -#  KDE4_THREADWEAVER_LIBRARIES- the threadweaver library and all depending libraries -#  KDE4_SOLID_LIBS            - the solid library and all depending libraries -#  KDE4_KNOTIFYCONFIG_LIBS    - the knotify config library and all depending libraries -#  KDE4_KROSSCORE_LIBS        - the kross core library and all depending libraries -#  KDE4_KROSSUI_LIBS          - the kross ui library which includes core and all depending libraries -#  KDE4_KTEXTEDITOR_LIBS      - the ktexteditor library and all depending libraries -#  KDE4_NEPOMUK_LIBS          - the nepomuk library and all depending libraries -#  KDE4_PLASMA_LIBS           - the plasma library and all depending librairies -#  KDE4_KUNITCONVERSION_LIBS  - the kunitconversion library and all depending libraries -#  KDE4_KDEWEBKIT_LIBS        - the kdewebkit library and all depending libraries -# -# This module defines also a bunch of variables used as locations for install directories -# for files of the package which is using this module. These variables don't say -# anything about the location of the installed KDE. -# They can be relative (to CMAKE_INSTALL_PREFIX) or absolute. -# Under Windows they are always relative. -# -#  BIN_INSTALL_DIR          - the directory where executables will be installed (default is prefix/bin) -#  BUNDLE_INSTALL_DIR       - Mac only: the directory where application bundles will be installed (default is /Applications/KDE4 ) -#  SBIN_INSTALL_DIR         - the directory where system executables will be installed (default is prefix/sbin) -#  LIB_INSTALL_DIR          - the directory where libraries will be installed (default is prefix/lib) -#  CONFIG_INSTALL_DIR       - the directory where config files will be installed -#  DATA_INSTALL_DIR         - the parent directory where applications can install their data -#  HTML_INSTALL_DIR         - the directory where HTML documentation will be installed -#  ICON_INSTALL_DIR         - the directory where the icons will be installed (default prefix/share/icons/) -#  INFO_INSTALL_DIR         - the directory where info files will be installed (default prefix/info) -#  KCFG_INSTALL_DIR         - the directory where kconfig files will be installed -#  LOCALE_INSTALL_DIR       - the directory where translations will be installed -#  MAN_INSTALL_DIR          - the directory where man pages will be installed (default prefix/man/) -#  MIME_INSTALL_DIR         - the directory where mimetype desktop files will be installed -#  PLUGIN_INSTALL_DIR       - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4) -#  IMPORTS_INSTALL_DIR      - the subdirectory relative to the install prefix where imports will be installed -#  SERVICES_INSTALL_DIR     - the directory where service (desktop, protocol, ...) files will be installed -#  SERVICETYPES_INSTALL_DIR - the directory where servicestypes desktop files will be installed -#  SOUND_INSTALL_DIR        - the directory where sound files will be installed -#  TEMPLATES_INSTALL_DIR    - the directory where templates (Create new file...) will be installed -#  WALLPAPER_INSTALL_DIR    - the directory where wallpapers will be installed -#  AUTOSTART_INSTALL_DIR    - the directory where autostart files will be installed -#  DEMO_INSTALL_DIR         - the directory where demos will be installed -#  KCONF_UPDATE_INSTALL_DIR - the directory where kconf_update files will be installed -#  SYSCONF_INSTALL_DIR      - the directory where sysconfig files will be installed (default /etc) -#  XDG_APPS_INSTALL_DIR     - the XDG apps dir -#  XDG_DIRECTORY_INSTALL_DIR- the XDG directory -#  XDG_MIME_INSTALL_DIR     - the XDG mimetypes install dir -#  DBUS_INTERFACES_INSTALL_DIR - the directory where dbus interfaces will be installed (default is prefix/share/dbus-1/interfaces) -#  DBUS_SERVICES_INSTALL_DIR        - the directory where dbus services will be installed (default is prefix/share/dbus-1/services ) -#  DBUS_SYSTEM_SERVICES_INSTALL_DIR        - the directory where dbus system services will be installed (default is prefix/share/dbus-1/system-services ) -# -# The variable INSTALL_TARGETS_DEFAULT_ARGS can be used when installing libraries -# or executables into the default locations. -# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed. -# It should also be used when installing applications, since then -# on OS X application bundles will be installed to BUNDLE_INSTALL_DIR. -# The variable MUST NOT be used for installing plugins. -# It also MUST NOT be used for executables which are intended to go into sbin/ or libexec/. -# -# Usage is like this: -#    install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} ) -# -# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go -# into bin/. -# -# -# The following variable is provided, but seem to be unused: -#  LIBS_HTML_INSTALL_DIR    /share/doc/HTML            CACHE STRING "Is this still used ?") -# -# The following user adjustable options are provided: -# -#  KDE4_ENABLE_FINAL - enable KDE-style enable-final all-in-one-compilation -#  KDE4_BUILD_TESTS  - enable this to build the testcases -#  KDE4_ENABLE_FPIE  - enable it to use gcc Position Independent Executables feature -#  KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR - only present for CMake >= 2.6.3, defaults to TRUE -#                      If enabled, the package should install its <package>Config.cmake file to -#                      lib/cmake/<package>/ instead to lib/<package>/cmake -#  KDE4_SERIALIZE_TOOL - wrapper to serialize potentially resource-intensive commands during -#                      parallel builds (set to 'icecc' when using icecream) -# -# It also adds the following macros and functions (from KDE4Macros.cmake) -#  KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui) -#    Use this to add Qt designer ui files to your application/library. -# -#  KDE4_ADD_UI3_FILES (SRCS_VAR file1.ui ... fileN.ui) -#    Use this to add Qt designer ui files from Qt version 3 to your application/library. -# -#  KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] [USE_RELATIVE_PATH] file1.kcfgc ... fileN.kcfgc) -#    Use this to add KDE config compiler files to your application/library. -#    Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files. -#    Use optional USE_RELATIVE_PATH to generate the classes in the build following the given -#    relative path to the file. -# -#  KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets) -#    Use this to add widget description files for the makekdewidgets code generator -#    for Qt Designer plugins. -# -#  KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN) -#    This macro is intended mainly for internal uses. -#    It is used for enable-final. It will generate two source files, -#    one for the C files and one for the C++ files. -#    These files will have the names given in filename_CXX and filename_C. -# -#  KDE4_ADD_PLUGIN ( name [WITH_PREFIX] file1 ... fileN ) -#    Create a KDE plugin (KPart, kioslave, etc.) from the given source files. -#    It supports KDE4_ENABLE_FINAL. -#    If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't. -# -#  KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN) -#    Create a KDE application in the form of a module loadable via kdeinit. -#    A library named kdeinit_<name> will be created and a small executable which links to it. -#    It supports KDE4_ENABLE_FINAL -#    If the executable doesn't have a GUI, use the option NOGUI. By default on OS X -#    application bundles are created, with the NOGUI option no bundles but simple executables -#    are created. Under Windows this flag is also necessary to separate between applications -#    with GUI and without. On other UNIX systems this flag has no effect. -#    RUN_UNINSTALLED is deprecated and is ignored, for details see the documentation for -#    KDE4_ADD_EXECUTABLE(). -# -#  KDE4_ADD_EXECUTABLE (name [NOGUI] [TEST] [RUN_UNINSTALLED] file1 ... fileN) -#    Equivalent to ADD_EXECUTABLE(), but additionally adds some more features: -#    -support for KDE4_ENABLE_FINAL -#    -support for automoc -#    -automatic RPATH handling -#    If the executable doesn't have a GUI, use the option NOGUI. By default on OS X -#    application bundles are created, with the NOGUI option no bundles but simple executables -#    are created. Under Windows this flag is also necessary to separate between applications -#    with GUI and without. On other UNIX systems this flag has no effect. -#    The option TEST is for internal use only. -#    The option RUN_UNINSTALLED is ignored. It was necessary with KDE 4.0 and 4.1 -#    if the executable had to be run from the build tree. Since KDE 4.2 all -#    executables can be always run uninstalled (the RPATH of executables which are not -#    yet installed points since then into the buildtree and is changed -#    to the proper location when installing, so RUN_UNINSTALLED is not necessary anymore). -# -#  KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN) -#    Equivalent to ADD_LIBRARY(). Additionally it supports KDE4_ENABLE_FINAL, -#    includes automoc-handling and sets LINK_INTERFACE_LIBRARIES target property empty. -#    The RPATH is set according to the global RPATH settings as set up by FindKDE4Internal.cmake -#    (CMAKE_SKIP_BUILD_RPATH=FALSE, CMAKE_BUILD_WITH_INSTALL_RPATH=FALSE, CMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE) -#    Under Windows it adds a -DMAKE_<name>_LIB definition to the compilation. -# -#  KDE4_ADD_UNIT_TEST (testname [TESTNAME targetname] file1 ... fileN) -#    add a unit test, which is executed when running make test -#    it will be built with RPATH poiting to the build dir -#    The targets are always created, but only built for the "all" -#    target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target -#    are created but not built by default. You can build them by manually building the target. -#    The name of the target can be specified using TESTNAME <targetname>, if it is not given -#    the macro will default to the <testname> -#    KDESRCDIR is set to the source directory of the test, this can be used with -#    KGlobal::dirs()->addResourceDir( "data", KDESRCDIR ) -# -# -#  KDE4_ADD_APP_ICON (SRCS_VAR pattern) -#  adds an application icon to target source list. -#  Make sure you have a 128x128 icon, or the icon won't display on Mac OS X. -#  Mac OSX notes : the application icon is added to a Mac OS X bundle so that Finder and friends show the right thing. -#  Win32 notes: the application icon(s) are compiled into the application -#  There is some workaround in kde4_add_kdeinit_executable to make it possible for those applications as well. -# Parameters: -#  SRCS_VAR  - specifies the list of source files -#  pattern   - regular expression for searching application icons -#  Example: KDE4_ADD_APP_ICON( myapp_SOURCES "pics/cr*-myapp.png") -#  Example: KDE4_ADD_APP_ICON( myapp_KDEINIT_SRCS "icons/oxygen/*/apps/myapp.png") -# -#  KDE4_UPDATE_ICONCACHE() -#    Notifies the icon cache that new icons have been installed by updating -#    mtime of ${ICON_INSTALL_DIR}/hicolor directory. -# -#  KDE4_INSTALL_ICONS( path theme) -#    Installs all png and svgz files in the current directory to the icon -#    directoy given in path, in the subdirectory for the given icon theme. -# -#  KDE4_CREATE_HANDBOOK( docbookfile [INSTALL_DESTINATION installdest] [SUBDIR subdir]) -#   Create the handbook from the docbookfile (using meinproc4) -#   The resulting handbook will be installed to <installdest> when using -#   INSTALL_DESTINATION <installdest>, or to <installdest>/<subdir> if -#   SUBDIR <subdir> is specified. -# -#  KDE4_CREATE_MANPAGE( docbookfile section ) -#   Create the manpage for the specified section from the docbookfile (using meinproc4) -#   The resulting manpage will be installed to <installdest> when using -#   INSTALL_DESTINATION <installdest>, or to <installdest>/<subdir> if -#   SUBDIR <subdir> is specified. -# -#  KDE4_INSTALL_AUTH_ACTIONS( HELPER_ID ACTIONS_FILE ) -#   This macro generates an action file, depending on the backend used, for applications using KAuth. -#   It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example -#   for file format). The macro will take care of generating the file according to the backend specified, -#   and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy -#   file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/), -#   and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during -#   the install phase -# -#  KDE4_INSTALL_AUTH_HELPER_FILES( HELPER_TARGET HELPER_ID HELPER_USER ) -#   This macro adds the needed files for an helper executable meant to be used by applications using KAuth. -#   It accepts the helper target, the helper ID (the DBUS name) and the user under which the helper will run on. -#   This macro takes care of generate the needed files, and install them in the right location. This boils down -#   to a DBus policy to let the helper register on the system bus, and a service file for letting the helper -#   being automatically activated by the system bus. -#   *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work. -# -# -# -#  A note on the possible values for CMAKE_BUILD_TYPE and how KDE handles -#  the flags for those buildtypes. FindKDE4Internal supports the values -#  Debug, Release, RelWithDebInfo, Profile and Debugfull: -# -#  Release -#          optimised for speed, qDebug/kDebug turned off, no debug symbols, no asserts -#  RelWithDebInfo (Release with debug info) -#          similar to Release, optimised for speed, but with debugging symbols on (-g) -#  Debug -#          optimised but debuggable, debugging on (-g) -#          (-fno-reorder-blocks -fno-schedule-insns -fno-inline) -#  DebugFull -#          no optimisation, full debugging on (-g3) -#  Profile -#          DebugFull + -ftest-coverage -fprofile-arcs -# -# -#  The default buildtype is RelWithDebInfo. -#  It is expected that the "Debug" build type be still debuggable with gdb -#  without going all over the place, but still produce better performance. -#  It's also important to note that gcc cannot detect all warning conditions -#  unless the optimiser is active. -# -# -#  This module allows to depend on a particular minimum version of kdelibs. -#  To acomplish that one should use the apropriate cmake syntax for -#  find_package. For example to depend on kdelibs >= 4.1.0 one should use -# -#  find_package(KDE4 4.1.0 REQUIRED) -# -#  In earlier versions of KDE you could use the variable KDE_MIN_VERSION to -#  have such a dependency. This variable is deprecated with KDE 4.2.0, but -#  will still work to make the module backwards-compatible. - -#  _KDE4_PLATFORM_INCLUDE_DIRS is used only internally -#  _KDE4_PLATFORM_DEFINITIONS is used only internally - -# Copyright (c) 2006-2009, Alexander Neundorf <neundorf@kde.org> -# Copyright (c) 2006, Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# this is required now by cmake 2.6 and so must not be skipped by if(KDE4_FOUND) below -cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) -# set the cmake policies to the 2.4.x compatibility settings (may change for KDE 4.3) -cmake_policy(VERSION 2.4.5) - -# CMake 2.6, set compatibility behaviour to cmake 2.4 -# this must be executed always, because the CMAKE_MINIMUM_REQUIRED() command above -# resets the policy settings, so we get a lot of warnings - -# CMP0000: don't require cmake_minimum_version() directly in the top level CMakeLists.txt, FindKDE4Internal.cmake is good enough -cmake_policy(SET CMP0000 OLD) -# CMP0002: in KDE4 we have multiple targets with the same name for the unit tests -cmake_policy(SET CMP0002 OLD) -# CMP0003: add the link paths to the link command as with cmake 2.4 -cmake_policy(SET CMP0003 OLD) -# CMP0005: keep escaping behaviour for definitions added via add_definitions() -cmake_policy(SET CMP0005 OLD) -# since cmake 2.6.3: NEW behaviour is that setting policies doesn't "escape" the file -# where this is done, macros and functions are executed with the policies as they -# were when the were defined. Keep the OLD behaviour so we can set the policies here -# for all KDE software without the big warning -cmake_policy(SET CMP0011 OLD) -# since cmake 2.6.4 -if(POLICY CMP0017) -  cmake_policy(SET CMP0017 NEW) -endif(POLICY CMP0017) - -# Only do something if it hasn't been found yet -if(NOT KDE4_FOUND) - -# get the directory of the current file, used later on in the file -get_filename_component( kde_cmake_module_dir  ${CMAKE_CURRENT_LIST_FILE} PATH) - - -include (MacroEnsureVersion) - -# We may only search for other packages with "REQUIRED" if we are required ourselves. -# This file can be processed either (usually) included in FindKDE4.cmake or -# (when building kdelibs) directly via FIND_PACKAGE(KDE4Internal), that's why -# we have to check for both KDE4_FIND_REQUIRED and KDE4Internal_FIND_REQUIRED. -if(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED) -  set(_REQ_STRING_KDE4 "REQUIRED") -  set(_REQ_STRING_KDE4_MESSAGE "FATAL_ERROR") -else(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED) -  set(_REQ_STRING_KDE4 ) -  set(_REQ_STRING_KDE4_MESSAGE "STATUS") -endif(KDE4_FIND_REQUIRED  OR  KDE4Internal_FIND_REQUIRED) - - -# Store CMAKE_MODULE_PATH and then append the current dir to it, so we are sure -# we get the FindQt4.cmake located next to us and not a different one. -# The original CMAKE_MODULE_PATH is restored later on. -set(_kde_cmake_module_path_back ${CMAKE_MODULE_PATH}) -set(CMAKE_MODULE_PATH ${kde_cmake_module_dir} ${CMAKE_MODULE_PATH} ) - -# if the minimum Qt requirement is changed, change all occurrence in the -# following lines -if( NOT QT_MIN_VERSION ) -  set(QT_MIN_VERSION "4.5.0") -endif( NOT QT_MIN_VERSION ) -if( ${QT_MIN_VERSION} VERSION_LESS "4.5.0" ) -  set(QT_MIN_VERSION "4.5.0") -endif( ${QT_MIN_VERSION} VERSION_LESS "4.5.0" ) - -# Tell FindQt4.cmake to point the QT_QTFOO_LIBRARY targets at the imported targets -# for the Qt libraries, so we get full handling of release and debug versions of the -# Qt libs and are flexible regarding the install location of Qt under Windows: -set(QT_USE_IMPORTED_TARGETS TRUE) - -#this line includes FindQt4.cmake, which searches the Qt library and headers -# TODO: we should check here that all necessary modules of Qt have been found, e.g. QtDBus -find_package(Qt4 ${_REQ_STRING_KDE4}) - -# automoc4 (from kdesupport) is now required, Alex -find_package(Automoc4 ${_REQ_STRING_KDE4}) - -# cmake 2.6.0 and automoc4 < 0.9.84 don't work right for -D flags -if (NOT AUTOMOC4_VERSION) -   # the version macro was added for 0.9.84 -   set(AUTOMOC4_VERSION "0.9.83") -endif (NOT AUTOMOC4_VERSION) -set(_automoc4_min_version "0.9.88") -macro_ensure_version("${_automoc4_min_version}" "${AUTOMOC4_VERSION}" _automoc4_version_ok) - -# for compatibility with KDE 4.0.x -set(KDE4_AUTOMOC_EXECUTABLE        "${AUTOMOC4_EXECUTABLE}" ) - -# Perl is not required for building KDE software, but we had that here since 4.0 -find_package(Perl) -if(NOT PERL_FOUND) -   message(STATUS "Perl not found") -endif(NOT PERL_FOUND) - -# restore the original CMAKE_MODULE_PATH -set(CMAKE_MODULE_PATH ${_kde_cmake_module_path_back}) - -# we check for Phonon not here, but further below, i.e. after KDELibsDependencies.cmake -# has been loaded, which helps in the case that phonon is installed to the same -# directory as kdelibs. -# find_package(Phonon ${_REQ_STRING_KDE4}) - - -# Check that we really found everything. -# If KDE4 was searched with REQUIRED, we error out with FATAL_ERROR if something wasn't found -# already above in the other FIND_PACKAGE() calls. -# If KDE4 was searched without REQUIRED and something in the FIND_PACKAGE() calls above wasn't found, -# then we get here and must check that everything has actually been found. If something is missing, -# we must not fail with FATAL_ERROR, but only not set KDE4_FOUND. - -if(NOT QT4_FOUND) -   message(STATUS "KDE4 not found, because Qt4 was not found") -   return() -endif(NOT QT4_FOUND) - -if(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok) -   if(NOT AUTOMOC4_FOUND) -      message(${_REQ_STRING_KDE4_MESSAGE} "KDE4 not found, because Automoc4 not found.") -      return() -   else(NOT AUTOMOC4_FOUND) -      if(NOT _automoc4_version_ok) -         message(${_REQ_STRING_KDE4_MESSAGE} "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least ${_automoc4_min_version}") -         return() -      endif(NOT _automoc4_version_ok) -   endif(NOT AUTOMOC4_FOUND) -endif(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok) - - -# now we are sure we have everything we need - -include (MacroLibrary) -include (CheckCXXCompilerFlag) -include (CheckCXXSourceCompiles) - - -# are we trying to compile kdelibs ? kdelibs_SOURCE_DIR comes from "project(kdelibs)" in kdelibs/CMakeLists.txt -# then enter bootstrap mode - -if(kdelibs_SOURCE_DIR) -   set(_kdeBootStrapping TRUE) -   message(STATUS "Building kdelibs...") -else(kdelibs_SOURCE_DIR) -   set(_kdeBootStrapping FALSE) -endif(kdelibs_SOURCE_DIR) - - -# helper macro, sets both the KDE4_FOO_LIBRARY and KDE4_FOO_LIBS variables to KDE4__foo -# It is used both in bootstrapping and in normal mode. -macro(_KDE4_SET_LIB_VARIABLES _var _lib _prefix) -   set(KDE4_${_var}_LIBRARY ${_prefix}${_lib} ) -   set(KDE4_${_var}_LIBS    ${_prefix}${_lib} ) -endmacro(_KDE4_SET_LIB_VARIABLES _var _lib _prefix) - -#######################  #now try to find some kde stuff  ################################ - -if (_kdeBootStrapping) -   set(KDE4_INCLUDE_DIR ${kdelibs_SOURCE_DIR}) - -   set(EXECUTABLE_OUTPUT_PATH ${kdelibs_BINARY_DIR}/bin ) - -   if (WIN32) -      set(LIBRARY_OUTPUT_PATH               ${EXECUTABLE_OUTPUT_PATH} ) -      # CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC -      if (NOT WINCE) -        set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) -        set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 ) -      else (NOT WINCE) -        set(KDE4_KCFGC_EXECUTABLE             ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) -        set(KDE4_MEINPROC_EXECUTABLE          ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/meinproc4 ) -      endif(NOT WINCE) - -      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 ) -      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen ) -      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets ) -   else (WIN32) -      set(LIBRARY_OUTPUT_PATH               ${CMAKE_BINARY_DIR}/lib ) -      set(KDE4_KCFGC_EXECUTABLE             ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler${CMAKE_EXECUTABLE_SUFFIX}.shell ) -      set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen${CMAKE_EXECUTABLE_SUFFIX}.shell ) -      set(KDE4_MEINPROC_EXECUTABLE          ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell ) -      set(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets${CMAKE_EXECUTABLE_SUFFIX}.shell ) -   endif (WIN32) - -   set(KDE4_LIB_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) - - -   # when building kdelibs, make the kcfg rules depend on the binaries... -   set( _KDE4_KCONFIG_COMPILER_DEP kconfig_compiler) -   set( _KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP kauth-policy-gen) -   set( _KDE4_MAKEKDEWIDGETS_DEP makekdewidgets) -   set( _KDE4_MEINPROC_EXECUTABLE_DEP meinproc4) - -   set(KDE4_INSTALLED_VERSION_OK TRUE) - -else (_kdeBootStrapping) - -  # ... but NOT otherwise -   set( _KDE4_KCONFIG_COMPILER_DEP) -   set( _KDE4_MAKEKDEWIDGETS_DEP) -   set( _KDE4_MEINPROC_EXECUTABLE_DEP) -   set( _KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP) - -   set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib ) - -   if (WIN32) -      # we don't want to be forced to set two paths into the build tree -      set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/bin ) - -      # on win32 the install dir is determined on runtime not install time -      # KDELIBS_INSTALL_DIR and QT_INSTALL_DIR are used in KDELibsDependencies.cmake to setup -      # kde install paths and library dependencies -      get_filename_component(_DIR ${KDE4_KDECONFIG_EXECUTABLE} PATH ) -      get_filename_component(KDE4_INSTALL_DIR ${_DIR} PATH ) -      get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH ) -      get_filename_component(QT_INSTALL_DIR ${_DIR} PATH ) -   endif (WIN32) - -   # These files contain information about the installed kdelibs, Alex -   include(${kde_cmake_module_dir}/KDELibsDependencies.cmake) -   include(${kde_cmake_module_dir}/KDEPlatformProfile.cmake) - -   # Check the version of KDE. It must be at least KDE_MIN_VERSION as set by the user. -   # KDE_VERSION is set in KDELibsDependencies.cmake since KDE 4.0.x. Alex -   # Support for the new-style (>= 2.6.0) support for requiring some version of a package: -   if (NOT KDE_MIN_VERSION) -      if (KDE4_FIND_VERSION_MAJOR) -         set(KDE_MIN_VERSION "${KDE4_FIND_VERSION_MAJOR}.${KDE4_FIND_VERSION_MINOR}.${KDE4_FIND_VERSION_PATCH}") -      else (KDE4_FIND_VERSION_MAJOR) -         set(KDE_MIN_VERSION "4.0.0") -      endif (KDE4_FIND_VERSION_MAJOR) -   endif (NOT KDE_MIN_VERSION) - -   #message(FATAL_ERROR "KDE_MIN_VERSION=${KDE_MIN_VERSION}  found ${KDE_VERSION} exact: -${KDE4_FIND_VERSION_EXACT}- version: -${KDE4_FIND_VERSION}-") -   macro_ensure_version( ${KDE_MIN_VERSION} ${KDE_VERSION} KDE4_INSTALLED_VERSION_OK ) - - -   # KDE4_LIB_INSTALL_DIR and KDE4_INCLUDE_INSTALL_DIR are set in KDELibsDependencies.cmake, -   # use them to set the KDE4_LIB_DIR and KDE4_INCLUDE_DIR "public interface" variables -   set(KDE4_LIB_DIR ${KDE4_LIB_INSTALL_DIR} ) -   set(KDE4_INCLUDE_DIR ${KDE4_INCLUDE_INSTALL_DIR} ) - - -   # This setting is currently not recorded in KDELibsDependencies.cmake: -   find_file(KDE4_PLASMA_OPENGL_FOUND plasma/glapplet.h PATHS ${KDE4_INCLUDE_DIR} NO_DEFAULT_PATH) - -   # Now include the file with the imported tools (executable targets). -   # This export-file is generated and installed by the toplevel CMakeLists.txt of kdelibs. -   # Having the libs and tools in two separate files should help with cross compiling. -   include(${kde_cmake_module_dir}/KDELibs4ToolsTargets.cmake) - -   # get the build CONFIGURATIONS which were exported in this file, and use just the first -   # of them to get the location of the installed executables -   get_target_property(_importedConfigurations  ${KDE4_TARGET_PREFIX}kconfig_compiler IMPORTED_CONFIGURATIONS ) -   list(GET _importedConfigurations 0 _firstConfig) - -   if(NOT WINCE) -   get_target_property(KDE4_KCFGC_EXECUTABLE             ${KDE4_TARGET_PREFIX}kconfig_compiler    LOCATION_${_firstConfig}) -   get_target_property(KDE4_MEINPROC_EXECUTABLE          ${KDE4_TARGET_PREFIX}meinproc4           LOCATION_${_firstConfig}) -   else(NOT WINCE) -    set(KDE4_KCFGC_EXECUTABLE             ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/kconfig_compiler ) -    set(KDE4_MEINPROC_EXECUTABLE          ${HOST_BINDIR}/${CMAKE_CFG_INTDIR}/meinproc4 ) -   endif(NOT WINCE) -   get_target_property(KDE4_KAUTH_POLICY_GEN_EXECUTABLE  ${KDE4_TARGET_PREFIX}kauth-policy-gen    LOCATION_${_firstConfig}) -   get_target_property(KDE4_MAKEKDEWIDGETS_EXECUTABLE    ${KDE4_TARGET_PREFIX}makekdewidgets      LOCATION_${_firstConfig}) - -   # allow searching cmake modules in all given kde install locations (KDEDIRS based) -   execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -   file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR) -   foreach(dir ${_data_DIR}) -      set (apath "${dir}/cmake/modules") -      if (EXISTS "${apath}") -         set (included 0) -         string(TOLOWER "${apath}" _apath) -         # ignore already added pathes, case insensitive -         foreach(adir ${CMAKE_MODULE_PATH}) -            string(TOLOWER "${adir}" _adir) -            if ("${_adir}" STREQUAL "${_apath}") -               set (included 1) -            endif ("${_adir}" STREQUAL "${_apath}") -         endforeach(adir) -         if (NOT included) -            message(STATUS "Adding ${apath} to CMAKE_MODULE_PATH") -            set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${apath}") -         endif (NOT included) -      endif (EXISTS "${apath}") -   endforeach(dir) - - -   # This file contains the exported library target from kdelibs (new with cmake 2.6.x), e.g. -   # the library target "kdeui" is exported as "KDE4__kdeui". The "KDE4__" is used as -   # "namespace" to separate the imported targets from "normal" targets, it is stored in -   # KDE4_TARGET_PREFIX, which is set in KDELibsDependencies.cmake . -   # This export-file is generated and installed by the toplevel CMakeLists.txt of kdelibs. -   # Include it to "import" the libraries from kdelibs into the current projects as targets. -   # This makes setting the _LIBRARY and _LIBS variables actually a bit superfluos, since e.g. -   # the kdeui library could now also be used just as "KDE4__kdeui" and still have all their -   # dependent libraries handled correctly. But to keep compatibility and not to change -   # behaviour we set all these variables anyway as seen below. Alex -   include(${kde_cmake_module_dir}/KDELibs4LibraryTargets.cmake) - -   # This one is for compatibility only: -   set(KDE4_THREADWEAVER_LIBRARIES ${KDE4_TARGET_PREFIX}threadweaver ) - -endif (_kdeBootStrapping) - - -# Set the various KDE4_FOO_LIBRARY/LIBS variables. -# In bootstrapping mode KDE4_TARGET_PREFIX is empty, so e.g. KDE4_KDECORE_LIBRARY -# will be simply set to "kdecore". - -# Sorted by names: -_kde4_set_lib_variables(KCMUTILS      kcmutils      "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KDE3SUPPORT   kde3support   "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KDECORE       kdecore       "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KDEUI         kdeui         "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KDEWEBKIT     kdewebkit     "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KDNSSD        kdnssd        "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KEMOTICONS    kemoticons    "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KFILE         kfile         "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KHTML         khtml         "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KIDLETIME     kidletime     "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KIO           kio           "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KJS           kjs           "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KJSAPI        kjsapi        "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KNEWSTUFF2    knewstuff2    "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KNEWSTUFF3    knewstuff3    "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KNOTIFYCONFIG knotifyconfig "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KPARTS        kparts        "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KPRINTUTILS   kprintutils   "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KROSSCORE     krosscore     "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KROSSUI       krossui       "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KTEXTEDITOR   ktexteditor   "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KUNITCONVERSION kunitconversion "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(KUTILS        kutils        "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(PLASMA        plasma        "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(SOLID         solid         "${KDE4_TARGET_PREFIX}") -_kde4_set_lib_variables(THREADWEAVER  threadweaver  "${KDE4_TARGET_PREFIX}") - -if (UNIX) -   _kde4_set_lib_variables(KDEFAKES kdefakes "${KDE4_TARGET_PREFIX}") -   _kde4_set_lib_variables(KDESU kdesu       "${KDE4_TARGET_PREFIX}") -   _kde4_set_lib_variables(KPTY kpty         "${KDE4_TARGET_PREFIX}") -endif (UNIX) - -# The nepomuk target does not always exist, since is is built conditionally. When bootstrapping -# we set it always anyways. -if(_kdeBootStrapping  OR  TARGET ${KDE4_TARGET_PREFIX}nepomuk) -   _kde4_set_lib_variables(NEPOMUK nepomuk "${KDE4_TARGET_PREFIX}") -endif(_kdeBootStrapping  OR  TARGET ${KDE4_TARGET_PREFIX}nepomuk) - - -################### try to find Phonon ############################################ - -# we do this here instead of above together with the checks for Perl etc. -# since FindPhonon.cmake also uses ${KDE4_LIB_INSTALL_DIR} to check for Phonon, -# which helps with finding the phonon installed as part of kdesupport: - -# only make Phonon REQUIRED if KDE4 itself is REQUIRED -find_package(Phonon 4.3.80 ${_REQ_STRING_KDE4}) -set(KDE4_PHONON_LIBRARY ${PHONON_LIBRARY}) -set(KDE4_PHONON_LIBS ${PHONON_LIBS}) -set(KDE4_PHONON_INCLUDES ${PHONON_INCLUDES}) - -if(NOT PHONON_FOUND) -   message(STATUS "KDE4 not found, because Phonon was not found") -   return() -endif(NOT PHONON_FOUND) - - -#####################  provide some options   ########################################## - -option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") -option(KDE4_BUILD_TESTS  "Build the tests") -option(KDE4_ENABLE_HTMLHANDBOOK  "Create targets htmlhandbook for creating the html versions of the docbook docs") -set(KDE4_SERIALIZE_TOOL "" CACHE STRING "Tool to serialize resource-intensive commands in parallel builds") - -# if CMake 2.6.3 or above is used, provide an option which should be used by other KDE packages -# whether to install a CMake FooConfig.cmake into lib/foo/cmake/ or /lib/cmake/foo/ -# (with 2.6.3 and above also lib/cmake/foo/ is supported): -if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) -   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) -else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) -   set(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR  FALSE) -endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) - -# Position-Independent-Executable is a feature of Binutils, Libc, and GCC that creates an executable -# which is something between a shared library and a normal executable. -# Programs compiled with these features appear as ?shared object? with the file command. -# info from "http://www.linuxfromscratch.org/hlfs/view/unstable/glibc/chapter02/pie.html" -option(KDE4_ENABLE_FPIE  "Enable platform supports PIE linking") - -if (WIN32) -   find_package(KDEWin REQUIRED) -   option(KDE4_ENABLE_UAC_MANIFEST "add manifest to make vista uac happy" OFF) -   if (KDE4_ENABLE_UAC_MANIFEST) -      find_program(KDE4_MT_EXECUTABLE mt -         PATHS ${KDEWIN_INCLUDE_DIR}/../bin -         NO_DEFAULT_PATH -      ) -      if (KDE4_MT_EXECUTABLE) -         message(STATUS "Found KDE manifest tool at ${KDE4_MT_EXECUTABLE} ") -      else (KDE4_MT_EXECUTABLE) -         message(STATUS "KDE manifest tool not found, manifest generating for Windows Vista disabled") -         set (KDE4_ENABLE_UAC_MANIFEST OFF) -      endif (KDE4_MT_EXECUTABLE) -   endif (KDE4_ENABLE_UAC_MANIFEST) -endif (WIN32) - -#####################  some more settings   ########################################## - -if( KDE4_ENABLE_FINAL) -   add_definitions(-DKDE_USE_FINAL) -endif(KDE4_ENABLE_FINAL) - -if(KDE4_SERIALIZE_TOOL) -   # parallel build with many meinproc invocations can consume a huge amount of memory -   set(KDE4_MEINPROC_EXECUTABLE ${KDE4_SERIALIZE_TOOL} ${KDE4_MEINPROC_EXECUTABLE}) -endif(KDE4_SERIALIZE_TOOL) - -# If we are building ! kdelibs, check where kdelibs are installed. -# If they are installed in a directory which contains "lib64", we default to "64" for LIB_SUFFIX, -# so the current project will by default also go into lib64. -# The same for lib32. Alex -set(_Init_LIB_SUFFIX "") -if ("${KDE4_LIB_DIR}" MATCHES lib64) -   set(_Init_LIB_SUFFIX 64) -endif ("${KDE4_LIB_DIR}" MATCHES lib64) -if ("${KDE4_LIB_DIR}" MATCHES lib32) -   set(_Init_LIB_SUFFIX 32) -endif ("${KDE4_LIB_DIR}" MATCHES lib32) - -set(LIB_SUFFIX "${_Init_LIB_SUFFIX}" CACHE STRING "Define suffix of directory name (32/64)" ) - - -########## the following are directories where stuff will be installed to  ########### -# -# this has to be after find_xxx() block above, since there KDELibsDependencies.cmake is included -# which contains the install dirs from kdelibs, which are reused below - -if (WIN32) -# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files - -   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}) - -   set(EXEC_INSTALL_PREFIX  "" )        # Base directory for executables and libraries -   set(SHARE_INSTALL_PREFIX "share" )   # Base directory for files which go to share/ -   set(BIN_INSTALL_DIR      "bin"   )   # The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin) -   set(SBIN_INSTALL_DIR     "sbin"  )   # The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin) - -   set(LIBEXEC_INSTALL_DIR  "${BIN_INSTALL_DIR}"          ) # The subdirectory relative to the install prefix where libraries will be installed (default is ${BIN_INSTALL_DIR}) -   set(INCLUDE_INSTALL_DIR  "include"                     ) # The subdirectory to the header prefix - -   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) -   set(IMPORTS_INSTALL_DIR       "${PLUGIN_INSTALL_DIR}/imports"   ) # "The subdirectory relative to the install prefix where imports will be installed -   set(CONFIG_INSTALL_DIR       "share/config"            ) # The config file install dir -   set(DATA_INSTALL_DIR         "share/apps"              ) # The parent directory where applications can install their data -   set(HTML_INSTALL_DIR         "share/doc/HTML"          ) # The HTML install dir for documentation -   set(ICON_INSTALL_DIR         "share/icons"             ) # The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/) -   set(KCFG_INSTALL_DIR         "share/config.kcfg"       ) # The install dir for kconfig files -   set(LOCALE_INSTALL_DIR       "share/locale"            ) # The install dir for translations -   set(MIME_INSTALL_DIR         "share/mimelnk"           ) # The install dir for the mimetype desktop files -   set(SERVICES_INSTALL_DIR     "share/kde4/services"     ) # The install dir for service (desktop, protocol, ...) files -   set(SERVICETYPES_INSTALL_DIR "share/kde4/servicetypes" ) # The install dir for servicestypes desktop files -   set(SOUND_INSTALL_DIR        "share/sounds"            ) # The install dir for sound files -   set(TEMPLATES_INSTALL_DIR    "share/templates"         ) # The install dir for templates (Create new file...) -   set(WALLPAPER_INSTALL_DIR    "share/wallpapers"        ) # The install dir for wallpapers -   set(DEMO_INSTALL_DIR         "share/demos"             ) # The install dir for demos -   set(KCONF_UPDATE_INSTALL_DIR "share/apps/kconf_update" ) # The kconf_update install dir -   set(AUTOSTART_INSTALL_DIR    "share/autostart"         ) # The install dir for autostart files - -   set(XDG_APPS_INSTALL_DIR      "share/applications/kde4"   ) # The XDG apps dir -   set(XDG_DIRECTORY_INSTALL_DIR "share/desktop-directories" ) # The XDG directory -   set(XDG_MIME_INSTALL_DIR      "share/mime/packages"       ) # The install dir for the xdg mimetypes - -   set(SYSCONF_INSTALL_DIR       "etc"                       ) # The sysconfig install dir (default /etc) -   set(MAN_INSTALL_DIR           "share/man"                 ) # The man install dir (default ${SHARE_INSTALL_PREFIX}/man/) -   set(INFO_INSTALL_DIR          "share/info"                ) # The info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -   set(DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" ) # The dbus interfaces install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -   set(DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services"     ) # The dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -   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)") - -else (WIN32) - -   # This macro implements some very special logic how to deal with the cache. -   # By default the various install locations inherit their value from their "parent" variable -   # so if you set CMAKE_INSTALL_PREFIX, then EXEC_INSTALL_PREFIX, PLUGIN_INSTALL_DIR will -   # calculate their value by appending subdirs to CMAKE_INSTALL_PREFIX . -   # This would work completely without using the cache. -   # But if somebody wants e.g. a different EXEC_INSTALL_PREFIX this value has to go into -   # the cache, otherwise it will be forgotten on the next cmake run. -   # Once a variable is in the cache, it doesn't depend on its "parent" variables -   # anymore and you can only change it by editing it directly. -   # this macro helps in this regard, because as long as you don't set one of the -   # variables explicitely to some location, it will always calculate its value from its -   # parents. So modifying CMAKE_INSTALL_PREFIX later on will have the desired effect. -   # But once you decide to set e.g. EXEC_INSTALL_PREFIX to some special location -   # this will go into the cache and it will no longer depend on CMAKE_INSTALL_PREFIX. -   # -   # additionally if installing to the same location as kdelibs, the other install -   # directories are reused from the installed kdelibs -   macro(_SET_FANCY _var _value _comment) -      set(predefinedvalue "${_value}") -      if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) -         set(predefinedvalue "${KDE4_${_var}}") -      endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) - -      if (NOT DEFINED ${_var}) -         set(${_var} ${predefinedvalue}) -      else (NOT DEFINED ${_var}) -         set(${_var} "${${_var}}" CACHE PATH "${_comment}") -      endif (NOT DEFINED ${_var}) -   endmacro(_SET_FANCY) - -   if(APPLE) -      set(BUNDLE_INSTALL_DIR "/Applications/KDE4" CACHE PATH "Directory where application bundles will be installed to on OSX" ) -   endif(APPLE) - -   _set_fancy(EXEC_INSTALL_PREFIX  "${CMAKE_INSTALL_PREFIX}"                 "Base directory for executables and libraries") -   _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share"           "Base directory for files which go to share/") -   _set_fancy(BIN_INSTALL_DIR      "${EXEC_INSTALL_PREFIX}/bin"              "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") -   _set_fancy(SBIN_INSTALL_DIR     "${EXEC_INSTALL_PREFIX}/sbin"             "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") -   _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})") -   _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)") -   _set_fancy(INCLUDE_INSTALL_DIR  "${CMAKE_INSTALL_PREFIX}/include"         "The subdirectory to the header prefix") - -   _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)") -   _set_fancy(IMPORTS_INSTALL_DIR       "${PLUGIN_INSTALL_DIR}/imports"                "The subdirectory relative to the install prefix where imports will be installed") -   _set_fancy(CONFIG_INSTALL_DIR       "${SHARE_INSTALL_PREFIX}/config"         "The config file install dir") -   _set_fancy(DATA_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/apps"           "The parent directory where applications can install their data") -   _set_fancy(HTML_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/doc/HTML"       "The HTML install dir for documentation") -   _set_fancy(ICON_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/icons"          "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") -   _set_fancy(KCFG_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/config.kcfg"    "The install dir for kconfig files") -   _set_fancy(LOCALE_INSTALL_DIR       "${SHARE_INSTALL_PREFIX}/locale"         "The install dir for translations") -   _set_fancy(MIME_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/mimelnk"        "The install dir for the mimetype desktop files") -   _set_fancy(SERVICES_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/kde4/services"  "The install dir for service (desktop, protocol, ...) files") -   _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") -   _set_fancy(SOUND_INSTALL_DIR        "${SHARE_INSTALL_PREFIX}/sounds"         "The install dir for sound files") -   _set_fancy(TEMPLATES_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/templates"      "The install dir for templates (Create new file...)") -   _set_fancy(WALLPAPER_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/wallpapers"     "The install dir for wallpapers") -   _set_fancy(DEMO_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/demos"          "The install dir for demos") -   _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update"       "The kconf_update install dir") -   _set_fancy(AUTOSTART_INSTALL_DIR    "${SHARE_INSTALL_PREFIX}/autostart"      "The install dir for autostart files") - -   _set_fancy(XDG_APPS_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/applications/kde4"         "The XDG apps dir") -   _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories"      "The XDG directory") -   _set_fancy(XDG_MIME_INSTALL_DIR     "${SHARE_INSTALL_PREFIX}/mime/packages"  "The install dir for the xdg mimetypes") - -   _set_fancy(SYSCONF_INSTALL_DIR      "${CMAKE_INSTALL_PREFIX}/etc"            "The sysconfig install dir (default ${CMAKE_INSTALL_PREFIX}/etc)") -   _set_fancy(MAN_INSTALL_DIR          "${SHARE_INSTALL_PREFIX}/man"            "The man install dir (default ${SHARE_INSTALL_PREFIX}/man/)") -   _set_fancy(INFO_INSTALL_DIR         "${SHARE_INSTALL_PREFIX}/info"           "The info install dir (default ${SHARE_INSTALL_PREFIX}/info)") -   _set_fancy(DBUS_INTERFACES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The dbus interfaces install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") -   _set_fancy(DBUS_SERVICES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/services"     "The dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)") -   _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)") - -endif (WIN32) - - -# For more documentation see above. -# Later on it will be possible to extend this for installing OSX frameworks -# The COMPONENT Devel argument has the effect that static libraries belong to the -# "Devel" install component. If we use this also for all install() commands -# for header files, it will be possible to install -#   -everything: make install OR cmake -P cmake_install.cmake -#   -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake -#   -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake -# This can then also be used for packaging with cpack. -set(INSTALL_TARGETS_DEFAULT_ARGS  RUNTIME DESTINATION "${BIN_INSTALL_DIR}" -                                  LIBRARY DESTINATION "${LIB_INSTALL_DIR}" -                                  ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT Devel ) - - -# on the Mac support an extra install directory for application bundles starting with cmake 2.6 -if(APPLE) -   set(INSTALL_TARGETS_DEFAULT_ARGS  ${INSTALL_TARGETS_DEFAULT_ARGS} -                               BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) -endif(APPLE) - - -##############  add some more default search paths  ############### -# -# the KDE4_xxx_INSTALL_DIR variables are empty when building kdelibs itself -# and otherwise point to the kde4 install dirs - -set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} -                              "${KDE4_INCLUDE_INSTALL_DIR}") - -set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} -                              "${KDE4_BIN_INSTALL_DIR}" ) - -set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} -                              "${KDE4_LIB_INSTALL_DIR}" ) - -# under Windows dlls may be also installed in bin/ -if(WIN32) -  set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} -                                "${_CMAKE_INSTALL_DIR}/bin" -                                "${CMAKE_INSTALL_PREFIX}/bin" ) -endif(WIN32) - - -###################################################### -#  and now the platform specific stuff -###################################################### - -# Set a default build type for single-configuration -# CMake generators if no build type is set. -if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) -   set(CMAKE_BUILD_TYPE RelWithDebInfo) -endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - - -if (WIN32) - -   if(CYGWIN) -      message(FATAL_ERROR "Cygwin is NOT supported, use mingw or MSVC to build KDE4.") -   endif(CYGWIN) - -   # limit win32 packaging to kdelibs at now -   # don't know if package name, version and notes are always available -   if(_kdeBootStrapping) -      find_package(KDEWIN_Packager) -      if (KDEWIN_PACKAGER_FOUND) -         kdewin_packager("kdelibs" "${KDE_VERSION}" "KDE base library" "") -      endif (KDEWIN_PACKAGER_FOUND) - -      include(Win32Macros) -      addExplorerWrapper("kdelibs") -   endif(_kdeBootStrapping) - -   set( _KDE4_PLATFORM_INCLUDE_DIRS ${KDEWIN_INCLUDES}) - -   # if we are compiling kdelibs, add KDEWIN_LIBRARIES explicitely, -   # otherwise they come from KDELibsDependencies.cmake, Alex -   if (_kdeBootStrapping) -      set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN_LIBRARIES} ) -   endif (_kdeBootStrapping) - -   # we prefer to use a different postfix for debug libs only on Windows -   # does not work atm -   set(CMAKE_DEBUG_POSTFIX "") - -   # windows, microsoft compiler -   if(MSVC) -      set( _KDE4_PLATFORM_DEFINITIONS -DKDE_FULL_TEMPLATE_EXPORT_INSTANTIATION -DWIN32_LEAN_AND_MEAN ) - -      # C4250: 'class1' : inherits 'class2::member' via dominance -      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4250" ) -      # C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' -      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4251" ) -      # C4396: 'identifier' : 'function' the inline specifier cannot be used when a friend declaration refers to a specialization of a function template -      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4396" ) -      # to avoid a lot of deprecated warnings -      add_definitions( -D_CRT_SECURE_NO_DEPRECATE -                       -D_CRT_SECURE_NO_WARNINGS -                       -D_CRT_NONSTDC_NO_DEPRECATE -                       -D_SCL_SECURE_NO_WARNINGS -                       ) -      # 'identifier' : no suitable definition provided for explicit template instantiation request -      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4661" ) -   endif(MSVC) - - -   # for visual studio IDE set the path correctly for custom commands -   # maybe under windows bat-files should be generated for running apps during the build -   if(MSVC_IDE) -     get_filename_component(PERL_LOCATION "${PERL_EXECUTABLE}" PATH) -     file(TO_NATIVE_PATH "${PERL_LOCATION}" PERL_PATH_WINDOWS) -     file(TO_NATIVE_PATH "${QT_BINARY_DIR}" QT_BIN_DIR_WINDOWS) -     set(CMAKE_MSVCIDE_RUN_PATH "${PERL_PATH_WINDOWS}\;${QT_BIN_DIR_WINDOWS}" -       CACHE STATIC "MSVC IDE Run path" FORCE) -   endif(MSVC_IDE) - -   # we don't support anything below w2k and all winapi calls are unicodes -   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0501 -DUNICODE" ) -endif (WIN32) - - -# setup default RPATH/install_name handling, may be overridden by KDE4_HANDLE_RPATH_FOR_EXECUTABLE -# It sets up to build with full RPATH. When installing, RPATH will be changed to the LIB_INSTALL_DIR -# and all link directories which are not inside the current build dir. -if (UNIX) -   set( _KDE4_PLATFORM_INCLUDE_DIRS) - -   # the rest is RPATH handling -   # here the defaults are set -   # which are partly overwritten in kde4_handle_rpath_for_library() -   # and kde4_handle_rpath_for_executable(), both located in KDE4Macros.cmake, Alex -   if (APPLE) -      set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) -   else (APPLE) -      # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of the standard system link -      # directories listed in CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) and use the RPATH figured out by cmake when compiling - -      list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemLibDir) -      if("${_isSystemLibDir}" STREQUAL "-1") -         set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}") -      endif("${_isSystemLibDir}" STREQUAL "-1") - -      set(CMAKE_SKIP_BUILD_RPATH FALSE) -      set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -   endif (APPLE) -endif (UNIX) - - -if (Q_WS_X11) -   # Done by FindQt4.cmake already -   #find_package(X11 REQUIRED) -   # UNIX has already set _KDE4_PLATFORM_INCLUDE_DIRS, so append -   set(_KDE4_PLATFORM_INCLUDE_DIRS ${_KDE4_PLATFORM_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ) -endif (Q_WS_X11) - - -# This will need to be modified later to support either Qt/X11 or Qt/Mac builds -if (APPLE) - -  set ( _KDE4_PLATFORM_DEFINITIONS -D__APPLE_KDE__ ) - -  # we need to set MACOSX_DEPLOYMENT_TARGET to (I believe) at least 10.2 or maybe 10.3 to allow -  # -undefined dynamic_lookup; in the future we should do this programmatically -  # hmm... why doesn't this work? -  set (ENV{MACOSX_DEPLOYMENT_TARGET} 10.3) - -  # "-undefined dynamic_lookup" means we don't care about missing symbols at link-time by default -  # this is bad, but unavoidable until there is the equivalent of libtool -no-undefined implemented -  # or perhaps it already is, and I just don't know where to look  ;) - -  set (CMAKE_SHARED_LINKER_FLAGS "-single_module -multiply_defined suppress ${CMAKE_SHARED_LINKER_FLAGS}") -  set (CMAKE_MODULE_LINKER_FLAGS "-multiply_defined suppress ${CMAKE_MODULE_LINKER_FLAGS}") -  #set(CMAKE_SHARED_LINKER_FLAGS "-single_module -undefined dynamic_lookup -multiply_defined suppress") -  #set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup -multiply_defined suppress") - -  # we profile... -  if(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile) -    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") -    set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") -  endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile) - -  # removed -Os, was there a special reason for using -Os instead of -O2 ?, Alex -  # optimization flags are set below for the various build types -  set (CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -fno-common") -  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common") -endif (APPLE) - - -if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) -   if (CMAKE_COMPILER_IS_GNUCXX) -      set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE) -      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}") -      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}") - -      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}") -      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_MODULE_LINKER_FLAGS}") -      set ( CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_EXE_LINKER_FLAGS}") - -      # we profile... -      if(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile) -        set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") -        set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") -      endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile) -   endif (CMAKE_COMPILER_IS_GNUCXX) -   if (CMAKE_C_COMPILER MATCHES "icc") -      set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE) -      set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}") -      set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}") -   endif (CMAKE_C_COMPILER MATCHES "icc") -endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) - -if (UNIX) -   set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} -D_LARGEFILE64_SOURCE") - -   check_cxx_source_compiles(" -#include <sys/types.h> - /* Check that off_t can represent 2**63 - 1 correctly. -    We can't simply define LARGE_OFF_T to be 9223372036854775807, -    since some C++ compilers masquerading as C compilers -    incorrectly reject 9223372036854775807.  */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - -  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -  int main() { return 0; } -" _OFFT_IS_64BIT) - -   if (NOT _OFFT_IS_64BIT) -     set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} -D_FILE_OFFSET_BITS=64") -   endif (NOT _OFFT_IS_64BIT) -endif (UNIX) - -if (CMAKE_SYSTEM_NAME MATCHES BSD) -   set ( _KDE4_PLATFORM_DEFINITIONS -D_GNU_SOURCE ) -   set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lc") -   set ( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -lc") -endif (CMAKE_SYSTEM_NAME MATCHES BSD) - - -############################################################ -# compiler specific settings -############################################################ - - -# this macro is for internal use only. -macro(KDE_CHECK_FLAG_EXISTS FLAG VAR DOC) -   if(NOT ${VAR} MATCHES "${FLAG}") -      set(${VAR} "${${VAR}} ${FLAG}" CACHE STRING "Flags used by the linker during ${DOC} builds." FORCE) -   endif(NOT ${VAR} MATCHES "${FLAG}") -endmacro(KDE_CHECK_FLAG_EXISTS FLAG VAR) - -if (MSVC) -   set (KDE4_ENABLE_EXCEPTIONS -EHsc) - -   # Qt disables the native wchar_t type, do it too to avoid linking issues -   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zc:wchar_t-" ) - -   # make sure that no header adds libcmt by default using #pragma comment(lib, "libcmt.lib") as done by mfc/afx.h -   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "Release with Debug Info") -   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELEASE "release") -   kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "release minsize") -   kde_check_flag_exists("/NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtd" CMAKE_EXE_LINKER_FLAGS_DEBUG "debug") -endif(MSVC) - -# This macro is for internal use only -# Return the directories present in gcc's include path. -macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result) -  set(${_result}) -  set(_gccOutput) -  file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" ) -  execute_process(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy -                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles -                  ERROR_VARIABLE _gccOutput -                  OUTPUT_VARIABLE _gccStdout ) -  file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy") - -  if( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" ) -    SET(${_result} ${CMAKE_MATCH_1}) -    STRING(REPLACE "\n" " " ${_result} "${${_result}}") -    SEPARATE_ARGUMENTS(${_result}) -  ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" ) -ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang) - -if (CMAKE_COMPILER_IS_GNUCC) -   _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs) -   set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES -       ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${_dirs}) -endif (CMAKE_COMPILER_IS_GNUCC) - -if (CMAKE_COMPILER_IS_GNUCXX) -   _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs) -   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES -       ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${_dirs}) - -   set (KDE4_ENABLE_EXCEPTIONS "-fexceptions -UQT_NO_EXCEPTIONS") -   # Select flags. -   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") -   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline") -   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs") -   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") -   set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline") -   set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs") - -   if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) -     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") -     # As off Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions -     set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common") -     add_definitions (-D_BSD_SOURCE) -   endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) - -   if (CMAKE_SYSTEM_NAME STREQUAL GNU) -      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread") -      set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread") -   endif (CMAKE_SYSTEM_NAME STREQUAL GNU) - -   # gcc under Windows -   if (MINGW) -      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import") -      set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import") -   endif (MINGW) - -   check_cxx_compiler_flag(-fPIE HAVE_FPIE_SUPPORT) -   if(KDE4_ENABLE_FPIE) -       if(HAVE_FPIE_SUPPORT) -        set (KDE4_CXX_FPIE_FLAGS "-fPIE") -        set (KDE4_PIE_LDFLAGS "-pie") -       else(HAVE_FPIE_SUPPORT) -        message(STATUS "Your compiler doesn't support the PIE flag") -       endif(HAVE_FPIE_SUPPORT) -   endif(KDE4_ENABLE_FPIE) - -   check_cxx_compiler_flag(-Woverloaded-virtual __KDE_HAVE_W_OVERLOADED_VIRTUAL) -   if(__KDE_HAVE_W_OVERLOADED_VIRTUAL) -       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual") -   endif(__KDE_HAVE_W_OVERLOADED_VIRTUAL) - -   # visibility support -   check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_GCC_VISIBILITY) -   set( __KDE_HAVE_GCC_VISIBILITY ${__KDE_HAVE_GCC_VISIBILITY} CACHE BOOL "GCC support for hidden visibility") - -   # get the gcc version -   exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} --version OUTPUT_VARIABLE _gcc_version_info) - -   string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") -   # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here: -   if (NOT _gcc_version) -      string (REGEX MATCH ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${gcc_on_macos}") -      if (gcc_on_macos) -        string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}") -      endif (gcc_on_macos) -   endif (NOT _gcc_version) - -   if (_gcc_version) -      macro_ensure_version("4.1.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_1) -      macro_ensure_version("4.2.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_2) -      macro_ensure_version("4.3.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_3) -   endif (_gcc_version) - -   # save a little by making local statics not threadsafe -   # ### do not enable it for older compilers, see -   # ### http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31806 -   if (GCC_IS_NEWER_THAN_4_3) -       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics") -   endif (GCC_IS_NEWER_THAN_4_3) - -   set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE) -   if (GCC_IS_NEWER_THAN_4_1) -      exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} -v OUTPUT_VARIABLE _gcc_alloc_info) -      string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}") -   endif (GCC_IS_NEWER_THAN_4_1) - -   if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) -      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") -      set (KDE4_C_FLAGS "-fvisibility=hidden") -      # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) -      # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break -      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") -      set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp) -      file(WRITE "${_source_file}" "${_source}") -      set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}") - -      try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" COMPILE_OUTPUT_VARIABLE _compile_output_var) - -      if(NOT _compile_result) -         message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation.") -      endif(NOT _compile_result) - -      if (GCC_IS_NEWER_THAN_4_2) -         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -fvisibility-inlines-hidden") -      endif (GCC_IS_NEWER_THAN_4_2) -   else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) -      set (__KDE_HAVE_GCC_VISIBILITY 0) -   endif (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) - -endif (CMAKE_COMPILER_IS_GNUCXX) - - -if (CMAKE_C_COMPILER MATCHES "icc") - -   set (KDE4_ENABLE_EXCEPTIONS -fexceptions) -   # Select flags. -   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") -   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_CXX_FLAGS_DEBUG          "-O2 -g -fno-inline -noalign") -   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g -fno-inline -noalign") -   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g") -   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG -DQT_NO_DEBUG") -   set(CMAKE_C_FLAGS_DEBUG            "-O2 -g -fno-inline -noalign") -   set(CMAKE_C_FLAGS_DEBUGFULL        "-g -fno-inline -noalign") - -   set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -ansi -Wall -w1 -Wpointer-arith -fno-common") -   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -w1 -Wpointer-arith -fno-exceptions -fno-common") - -   # visibility support -   set(__KDE_HAVE_ICC_VISIBILITY) -#   check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_ICC_VISIBILITY) -#   if (__KDE_HAVE_ICC_VISIBILITY) -#      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") -#   endif (__KDE_HAVE_ICC_VISIBILITY) - -endif (CMAKE_C_COMPILER MATCHES "icc") - - -###########    end of platform specific stuff  ########################## - - -# KDE4Macros.cmake contains all the KDE specific macros -include(${kde_cmake_module_dir}/KDE4Macros.cmake) - - -# decide whether KDE4 has been found -set(KDE4_FOUND FALSE) -if (KDE4_INCLUDE_DIR AND KDE4_LIB_DIR AND KDE4_KCFGC_EXECUTABLE AND KDE4_INSTALLED_VERSION_OK) -   set(KDE4_FOUND TRUE) -endif (KDE4_INCLUDE_DIR AND KDE4_LIB_DIR AND KDE4_KCFGC_EXECUTABLE AND KDE4_INSTALLED_VERSION_OK) - - -macro (KDE4_PRINT_RESULTS) - -   # inside kdelibs the include dir and lib dir are internal, not "found" -   if (NOT _kdeBootStrapping) -       if(KDE4_INCLUDE_DIR) -          message(STATUS "Found KDE 4.7 include dir: ${KDE4_INCLUDE_DIR}") -       else(KDE4_INCLUDE_DIR) -          message(STATUS "ERROR: unable to find the KDE 4 headers") -       endif(KDE4_INCLUDE_DIR) - -       if(KDE4_LIB_DIR) -          message(STATUS "Found KDE 4.7 library dir: ${KDE4_LIB_DIR}") -       else(KDE4_LIB_DIR) -          message(STATUS "ERROR: unable to find the KDE 4 core library") -       endif(KDE4_LIB_DIR) -   endif (NOT _kdeBootStrapping) - -   if(KDE4_KCFGC_EXECUTABLE) -      message(STATUS "Found the KDE4 kconfig_compiler preprocessor: ${KDE4_KCFGC_EXECUTABLE}") -   else(KDE4_KCFGC_EXECUTABLE) -      message(STATUS "Didn't find the KDE4 kconfig_compiler preprocessor") -   endif(KDE4_KCFGC_EXECUTABLE) - -   if(AUTOMOC4_EXECUTABLE) -      message(STATUS "Found automoc4: ${AUTOMOC4_EXECUTABLE}") -   else(AUTOMOC4_EXECUTABLE) -      message(STATUS "Didn't find automoc4") -   endif(AUTOMOC4_EXECUTABLE) -endmacro (KDE4_PRINT_RESULTS) - - -if (KDE4Internal_FIND_REQUIRED AND NOT KDE4_FOUND) -   #bail out if something wasn't found -   kde4_print_results() -   if (NOT KDE4_INSTALLED_VERSION_OK) -     message(FATAL_ERROR "ERROR: the installed kdelibs version ${KDE_VERSION} is too old, at least version ${KDE_MIN_VERSION} is required") -   endif (NOT KDE4_INSTALLED_VERSION_OK) - -   if (NOT KDE4_KCFGC_EXECUTABLE) -     message(FATAL_ERROR "ERROR: could not detect a usable kconfig_compiler") -   endif (NOT KDE4_KCFGC_EXECUTABLE) - -   message(FATAL_ERROR "ERROR: could NOT find everything required for compiling KDE 4 programs") -endif (KDE4Internal_FIND_REQUIRED AND NOT KDE4_FOUND) - -if (NOT KDE4Internal_FIND_QUIETLY) -   kde4_print_results() -endif (NOT KDE4Internal_FIND_QUIETLY) - -#add the found Qt and KDE include directories to the current include path -#the ${KDE4_INCLUDE_DIR}/KDE directory is for forwarding includes, eg. #include <KMainWindow> -set(KDE4_INCLUDES -   ${KDE4_INCLUDE_DIR} -   ${KDE4_INCLUDE_DIR}/KDE -   ${KDE4_PHONON_INCLUDES} -   ${QT_INCLUDES} -   ${_KDE4_PLATFORM_INCLUDE_DIRS} -) - -# Used by kdebug.h: the "toplevel dir" is one level above CMAKE_SOURCE_DIR -get_filename_component(_KDE4_CMAKE_TOPLEVEL_DIR "${CMAKE_SOURCE_DIR}/.." ABSOLUTE) -string(LENGTH "${_KDE4_CMAKE_TOPLEVEL_DIR}" _KDE4_CMAKE_TOPLEVEL_DIR_LENGTH) - -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}) - -if (NOT _kde4_uninstall_rule_created) -   set(_kde4_uninstall_rule_created TRUE) - -   configure_file("${kde_cmake_module_dir}/kde4_cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" @ONLY) - -   add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") - -endif (NOT _kde4_uninstall_rule_created) - -endif(NOT KDE4_FOUND) diff --git a/attic/modules/KDE4Defaults.cmake b/attic/modules/KDE4Defaults.cmake deleted file mode 100644 index d082a813..00000000 --- a/attic/modules/KDE4Defaults.cmake +++ /dev/null @@ -1,38 +0,0 @@ - -enable_testing() -SET(BUILD_TESTING ON CACHE INTERNAL "Build the testing tree (internal)") - -# support for Dart: http://public.kitware.com/dashboard.php?name=kde -if (EXISTS ${CMAKE_SOURCE_DIR}/CTestConfig.cmake) -   include(CTest) -endif (EXISTS ${CMAKE_SOURCE_DIR}/CTestConfig.cmake) - -# Always include srcdir and builddir in include path -# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} in about every subdir -# since cmake 2.4.0 -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# put the include dirs which are in the source or build tree -# before all other include dirs, so the headers in the sources -# are prefered over the already installed ones -# since cmake 2.4.1 -set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) - -# define the generic version of the libraries here -# this makes it easy to advance it when the next KDE release comes -# Use this version number for libraries which are at version n in KDE version n -set(GENERIC_LIB_VERSION "4.7.0") -set(GENERIC_LIB_SOVERSION "4") - -# Use this version number for libraries which are already at version n+1 in KDE version n -set(KDE_NON_GENERIC_LIB_VERSION "5.7.0") -set(KDE_NON_GENERIC_LIB_SOVERSION "5") - -# windows does not support LD_LIBRARY_PATH or similar -# all searchable directories has to be defined by the PATH environment var -# to reduce the number of required pathes executables are placed into -# the build bin dir -if (WIN32) - set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -# set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -endif(WIN32) diff --git a/attic/modules/KDE4Macros.cmake b/attic/modules/KDE4Macros.cmake deleted file mode 100644 index e1ea80ae..00000000 --- a/attic/modules/KDE4Macros.cmake +++ /dev/null @@ -1,1356 +0,0 @@ -# for documentation look at FindKDE4Internal.cmake - -# this file contains the following macros (or functions): -# KDE4_ADD_UI_FILES -# KDE4_ADD_UI3_FILES -# KDE4_ADD_KCFG_FILES -# _KDE4_SET_CUSTOM_TARGET_PROPERTY -# _KDE4_GET_CUSTOM_TARGET_PROPERTY -# KDE4_MOC_HEADERS -# KDE4_HANDLE_AUTOMOC -# KDE4_CREATE_FINAL_FILES -# KDE4_ADD_PLUGIN -# KDE4_ADD_KDEINIT_EXECUTABLE -# KDE4_ADD_UNIT_TEST -# KDE4_ADD_EXECUTABLE -# KDE4_ADD_WIDGET_FILES -# KDE4_UPDATE_ICONCACHE -# KDE4_INSTALL_ICONS -# KDE4_REMOVE_OBSOLETE_CMAKE_FILES -# KDE4_NO_ENABLE_FINAL -# KDE4_CREATE_HANDBOOK -# KDE4_ADD_APP_ICON -# KDE4_CREATE_MANPAGE -# KDE4_CREATE_BASIC_CMAKE_VERSION_FILE (function) -# KDE4_INSTALL_AUTH_HELPER_FILES -# KDE4_AUTH_INSTALL_ACTIONS - -# Copyright (c) 2006-2009 Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org> -# Copyright (c) 2007 Matthias Kretz <kretz@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# This is for versions of automoc4 which don't provide these two macros. -# If such a version is used, just use the "old" style automoc handling.  -if(NOT COMMAND _AUTOMOC4_KDE4_PRE_TARGET_HANDLING) - -   macro(_AUTOMOC4_KDE4_PRE_TARGET_HANDLING _target _srcs) -      if(MSVC) -         add_automoc4_target("${_target}_automoc" ${_srcs}) -      else(MSVC) -         automoc4(${_target} ${_srcs} ) -      endif(MSVC) -   endmacro(_AUTOMOC4_KDE4_PRE_TARGET_HANDLING) - - -   macro(_AUTOMOC4_KDE4_POST_TARGET_HANDLING _target) -      if(MSVC) -         add_dependencies(${_target} "${_target}_automoc") -      endif(MSVC) -   endmacro(_AUTOMOC4_KDE4_POST_TARGET_HANDLING) - -endif(NOT COMMAND _AUTOMOC4_KDE4_PRE_TARGET_HANDLING) - - -macro (KDE4_ADD_KCFG_FILES _sources ) -   foreach (_current_ARG ${ARGN}) -       if( ${_current_ARG} STREQUAL "GENERATE_MOC" ) -           set(_kcfg_generatemoc TRUE) -       endif( ${_current_ARG} STREQUAL "GENERATE_MOC" ) - -       if( ${_current_ARG} STREQUAL "USE_RELATIVE_PATH" ) -           set(_kcfg_relativepath TRUE) -       endif( ${_current_ARG} STREQUAL "USE_RELATIVE_PATH" ) -   endforeach (_current_ARG ${ARGN}) - -   foreach (_current_FILE ${ARGN}) - -     if(NOT ${_current_FILE} STREQUAL "GENERATE_MOC" AND NOT ${_current_FILE} STREQUAL "USE_RELATIVE_PATH") -       get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -       get_filename_component(_abs_PATH ${_tmp_FILE} PATH) - -       if (_kcfg_relativepath) # Process relative path only if the option was set -           # Get relative path -           get_filename_component(_rel_PATH ${_current_FILE} PATH) - -           if (IS_ABSOLUTE ${_rel_PATH}) -               # We got an absolute path -               set(_rel_PATH "") -           endif (IS_ABSOLUTE ${_rel_PATH}) -       endif (_kcfg_relativepath) - -       get_filename_component(_basename ${_tmp_FILE} NAME_WE) -       # If we had a relative path and we're asked to use it, then change the basename accordingly -       if(NOT ${_rel_PATH} STREQUAL "") -           set(_basename ${_rel_PATH}/${_basename}) -       endif(NOT ${_rel_PATH} STREQUAL "") - -       file(READ ${_tmp_FILE} _contents) -       string(REGEX REPLACE "^(.*\n)?File=([^\n]+kcfg).*\n.*$" "\\2"  _kcfg_FILENAME "${_contents}") -       set(_src_FILE    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) -       set(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) -       set(_moc_FILE    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) -       set(_kcfg_FILE   ${_abs_PATH}/${_kcfg_FILENAME}) -       # Maybe the .kcfg is a generated file? -       if(NOT EXISTS "${_kcfg_FILE}") -           set(_kcfg_FILE   ${CMAKE_CURRENT_BINARY_DIR}/${_kcfg_FILENAME}) -       endif(NOT EXISTS "${_kcfg_FILE}") -       if(NOT EXISTS "${_kcfg_FILE}") -           message(ERROR "${_kcfg_FILENAME} not found; tried in ${_abs_PATH} and ${CMAKE_CURRENT_BINARY_DIR}") -       endif(NOT EXISTS "${_kcfg_FILE}") - -       # make sure the directory exist in the build directory -       if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_rel_PATH}") -           file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_rel_PATH}) -       endif(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_rel_PATH}") - -#       if (CMAKE_CROSSCOMPILING) -#           set(IMPORT_KCONFIG_COMPILER_EXECUTABLE "${KDE_HOST_TOOLS_PATH}/ImportKConfigCompilerExecutable.cmake" CACHE FILEPATH "Point it to the export file of kconfig_compiler from a native build") -#           include(${IMPORT_KCONFIG_COMPILER_EXECUTABLE}) -#           set(KDE4_KCFGC_EXECUTABLE kconfig_compiler) -#       endif (CMAKE_CROSSCOMPILING) - -       # the command for creating the source file from the kcfg file -       add_custom_command(OUTPUT ${_header_FILE} ${_src_FILE} -          COMMAND ${KDE4_KCFGC_EXECUTABLE} -          ARGS ${_kcfg_FILE} ${_tmp_FILE} -d ${CMAKE_CURRENT_BINARY_DIR}/${_rel_PATH} -          MAIN_DEPENDENCY ${_tmp_FILE} -          DEPENDS ${_kcfg_FILE} ${_KDE4_KCONFIG_COMPILER_DEP} ) - -       if(_kcfg_generatemoc) -         qt4_generate_moc(${_header_FILE} ${_moc_FILE} ) -         set_source_files_properties(${_src_FILE} PROPERTIES SKIP_AUTOMOC TRUE)  # don't run automoc on this file -         list(APPEND ${_sources} ${_moc_FILE}) -       endif(_kcfg_generatemoc) - -       list(APPEND ${_sources} ${_src_FILE} ${_header_FILE}) -     endif(NOT ${_current_FILE} STREQUAL "GENERATE_MOC" AND NOT ${_current_FILE} STREQUAL "USE_RELATIVE_PATH") -   endforeach (_current_FILE) - -endmacro (KDE4_ADD_KCFG_FILES) - - -get_filename_component(KDE4_MODULE_DIR  ${CMAKE_CURRENT_LIST_FILE} PATH) - -#create the implementation files from the ui files and add them to the list of sources -#usage: KDE4_ADD_UI_FILES(foo_SRCS ${ui_files}) -macro (KDE4_ADD_UI_FILES _sources ) -   foreach (_current_FILE ${ARGN}) - -      get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -      get_filename_component(_basename ${_tmp_FILE} NAME_WE) -      set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) - -      # we need to run uic and replace some things in the generated file -      # this is done by executing the cmake script kde4uic.cmake -      add_custom_command(OUTPUT ${_header} -         COMMAND ${CMAKE_COMMAND} -         ARGS -         -DKDE4_HEADER:BOOL=ON -         -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE} -         -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -         -DKDE_UIC_H_FILE:FILEPATH=${_header} -         -DKDE_UIC_BASENAME:STRING=${_basename} -         -P ${KDE4_MODULE_DIR}/kde4uic.cmake -         MAIN_DEPENDENCY ${_tmp_FILE} -      ) -      list(APPEND ${_sources} ${_header}) -   endforeach (_current_FILE) -endmacro (KDE4_ADD_UI_FILES) - - -# this is basically a copy of the qt4_get_moc_flags() macros from FindQt4.cmake -# which is for internal use only, so we should not use it here: -macro (_KDE4_GET_MOC_FLAGS _moc_flags) -   set(${_moc_flags}) -   get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES) - -   foreach(_current ${_inc_DIRS}) -      set(${_moc_flags} ${${_moc_flags}} "-I${_current}") -   endforeach(_current ${_inc_DIRS}) - -   get_directory_property(_defines COMPILE_DEFINITIONS) -   foreach(_current ${_defines}) -      set(${_moc_flags} ${${_moc_flags}} "-D${_current}") -   endforeach(_current ${_defines}) - -   if(Q_WS_WIN) -      set(${_moc_flags} ${${_moc_flags}} -DWIN32) -   endif(Q_WS_WIN) - -   # if Qt is installed only as framework, add -F /library/Frameworks to the moc arguments -   # otherwise moc can't find the headers in the framework include dirs -   if(APPLE  AND  "${QT_QTCORE_INCLUDE_DIR}" MATCHES "/Library/Frameworks/") -      set(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-F/Library/Frameworks") -   endif(APPLE  AND  "${QT_QTCORE_INCLUDE_DIR}" MATCHES "/Library/Frameworks/") - -endmacro(_KDE4_GET_MOC_FLAGS) - - -#create the implementation files from the ui files and add them to the list of sources -#usage: KDE4_ADD_UI3_FILES(foo_SRCS ${ui_files}) -macro (KDE4_ADD_UI3_FILES _sources ) - -   _kde4_get_moc_flags(_moc_INCS) - -   foreach (_current_FILE ${ARGN}) - -      get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) -      get_filename_component(_basename ${_tmp_FILE} NAME_WE) -      set(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) -      set(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) -      set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp) - -      add_custom_command(OUTPUT ${_header} -         COMMAND ${CMAKE_COMMAND} -         -DKDE3_HEADER:BOOL=ON -         -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE} -         -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -         -DKDE_UIC_H_FILE:FILEPATH=${_header} -         -DKDE_UIC_BASENAME:STRING=${_basename} -         -DKDE_UIC_PLUGIN_DIR:FILEPATH="." -         -P ${KDE4_MODULE_DIR}/kde4uic.cmake -         MAIN_DEPENDENCY ${_tmp_FILE} -      ) - -# we need to run uic3 and replace some things in the generated file -      # this is done by executing the cmake script kde4uic.cmake -      add_custom_command(OUTPUT ${_src} -         COMMAND ${CMAKE_COMMAND} -         ARGS -         -DKDE3_IMPL:BOOL=ON -         -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE} -         -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} -         -DKDE_UIC_CPP_FILE:FILEPATH=${_src} -         -DKDE_UIC_H_FILE:FILEPATH=${_header} -         -DKDE_UIC_BASENAME:STRING=${_basename} -         -DKDE_UIC_PLUGIN_DIR:FILEPATH="." -         -P ${KDE4_MODULE_DIR}/kde4uic.cmake -         MAIN_DEPENDENCY ${_header} -      ) - -      add_custom_command(OUTPUT ${_moc} -         COMMAND ${QT_MOC_EXECUTABLE} -         ARGS ${_moc_INCS} ${_header} -o ${_moc} -         MAIN_DEPENDENCY ${_header} -      ) -      list(APPEND ${_sources} ${_src} ${_moc} ) - -   endforeach (_current_FILE) -endmacro (KDE4_ADD_UI3_FILES) - -macro (_KDE4_SET_CUSTOM_TARGET_PROPERTY _target_name _property_name _property) -   string(REGEX REPLACE "[/ ]" "_" _dir "${CMAKE_CURRENT_SOURCE_DIR}") -   set(_kde4_${_dir}_${_target_name}_${_property_name} "${_property}") -endmacro (_KDE4_SET_CUSTOM_TARGET_PROPERTY) - - -macro (_KDE4_GET_CUSTOM_TARGET_PROPERTY _var _target_name _property_name) -   string(REGEX REPLACE "[/ ]" "_" _dir "${CMAKE_CURRENT_SOURCE_DIR}") -   set(${_var} "${_kde4_${_dir}_${_target_name}_${_property_name}}") -endmacro (_KDE4_GET_CUSTOM_TARGET_PROPERTY) - - -macro (KDE4_MOC_HEADERS _target_NAME) -   # if automoc4 from kdesupport has been found, use the macro provided there -   automoc4_moc_headers(${_target_NAME} ${ARGN}) -endmacro (KDE4_MOC_HEADERS) - -macro(KDE4_HANDLE_AUTOMOC _target_NAME _SRCS) -   # if automoc4 from kdesupport has been found, use the macro provided there -   automoc4(${_target_NAME} ${_SRCS}) -endmacro(KDE4_HANDLE_AUTOMOC) - -macro(KDE4_INSTALL_TS_FILES _lang _sdir) -   file(GLOB_RECURSE _ts_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${_sdir}/*) -   foreach(_current_TS_FILES ${_ts_files}) -      string(REGEX MATCH "\\.svn/" _in_svn ${_current_TS_FILES}) -      if(NOT _in_svn) -         get_filename_component(_subpath ${_current_TS_FILES} PATH) -         install(FILES ${_current_TS_FILES} DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_SCRIPTS/${_subpath}) -      endif(NOT _in_svn) -   endforeach(_current_TS_FILES) -endmacro(KDE4_INSTALL_TS_FILES) - - -macro (KDE4_CREATE_HANDBOOK _docbook) -   get_filename_component(_input ${_docbook} ABSOLUTE) -   set(_doc ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2) - -   #Bootstrap -   if (_kdeBootStrapping) -      set(_ssheet "${CMAKE_BINARY_DIR}/kdoctools/customization/kde-chunk.xsl") -      set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/") -   else (_kdeBootStrapping) -      set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl") -      set(_bootstrapOption) -   endif (_kdeBootStrapping) - -   file(GLOB _docs *.docbook) - -#   if (CMAKE_CROSSCOMPILING) -#      set(IMPORT_MEINPROC4_EXECUTABLE "${KDE_HOST_TOOLS_PATH}/ImportMeinProc4Executable.cmake" CACHE FILEPATH "Point it to the export file of meinproc4 from a native build") -#      include(${IMPORT_MEINPROC4_EXECUTABLE}) -#      set(KDE4_MEINPROC_EXECUTABLE meinproc4) -#   endif (CMAKE_CROSSCOMPILING) - -   add_custom_command(OUTPUT ${_doc} -      COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} --cache ${_doc} ${_input} -      DEPENDS ${_docs} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -   ) -   get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) -   set(_targ "${_targ}-handbook") -   add_custom_target(${_targ} ALL DEPENDS ${_doc}) - -   if(KDE4_ENABLE_HTMLHANDBOOK) -      set(_htmlDoc ${CMAKE_CURRENT_SOURCE_DIR}/index.html) -      add_custom_command(OUTPUT ${_htmlDoc} -         COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} -o ${_htmlDoc} ${_input} -         DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -      ) -      add_custom_target(htmlhandbook DEPENDS ${_htmlDoc}) -   endif(KDE4_ENABLE_HTMLHANDBOOK) - -   set(_args ${ARGN}) - -   set(_installDest) -   if(_args) -      list(GET _args 0 _tmp) -      if("${_tmp}" STREQUAL "INSTALL_DESTINATION") -         list(GET _args 1 _installDest ) -         list(REMOVE_AT _args 0 1) -      endif("${_tmp}" STREQUAL "INSTALL_DESTINATION") -   endif(_args) - -   get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) -   if(_args) -      list(GET _args 0 _tmp) -      if("${_tmp}" STREQUAL "SUBDIR") -         list(GET _args 1 dirname ) -         list(REMOVE_AT _args 0 1) -      endif("${_tmp}" STREQUAL "SUBDIR") -   endif(_args) - -   if(_installDest) -      file(GLOB _images *.png) -      install(FILES ${_doc} ${_docs} ${_images} DESTINATION ${_installDest}/${dirname}) -      # TODO symlinks on non-unix platforms -      if (UNIX) -         # execute some cmake code on make install which creates the symlink -         install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${_installDest}/common\"  \"\$ENV{DESTDIR}${_installDest}/${dirname}/common\" )" ) -      endif (UNIX) -   endif(_installDest) - -endmacro (KDE4_CREATE_HANDBOOK) - - -macro (KDE4_CREATE_MANPAGE _docbook _section) -   get_filename_component(_input ${_docbook} ABSOLUTE) -   get_filename_component(_base ${_input} NAME) - -   string(REGEX REPLACE "\\.${_section}\\.docbook$" "" _base ${_base}) - -   set(_doc ${CMAKE_CURRENT_BINARY_DIR}/${_base}.${_section}) -   # sometimes we have "man-" prepended -   string(REGEX REPLACE "/man-" "/" _outdoc ${_doc}) - -   #Bootstrap -   if (_kdeBootStrapping) -      set(_ssheet "${CMAKE_BINARY_DIR}/kdoctools/customization/kde-include-man.xsl") -      set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/") -   else (_kdeBootStrapping) -      set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-include-man.xsl") -      set(_bootstrapOption) -   endif (_kdeBootStrapping) - -#   if (CMAKE_CROSSCOMPILING) -#      set(IMPORT_MEINPROC4_EXECUTABLE "${KDE_HOST_TOOLS_PATH}/ImportMeinProc4Executable.cmake" CACHE FILEPATH "Point it to the export file of meinproc4 from a native build") -#      include(${IMPORT_MEINPROC4_EXECUTABLE}) -#      set(KDE4_MEINPROC_EXECUTABLE meinproc4) -#   endif (CMAKE_CROSSCOMPILING) - -   add_custom_command(OUTPUT ${_outdoc} -      COMMAND ${KDE4_MEINPROC_EXECUTABLE} --stylesheet ${_ssheet} --check ${_bootstrapOption} ${_input} -      DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} -   ) -   get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) -   set(_targ "${_targ}-manpage-${_base}") -   add_custom_target(${_targ} ALL DEPENDS "${_outdoc}") - -   set(_args ${ARGN}) - -   set(_installDest) -   if(_args) -      list(GET _args 0 _tmp) -      if("${_tmp}" STREQUAL "INSTALL_DESTINATION") -         list(GET _args 1 _installDest ) -         list(REMOVE_AT _args 0 1) -      endif("${_tmp}" STREQUAL "INSTALL_DESTINATION") -   endif(_args) - -   get_filename_component(dirname ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) -   if(_args) -      list(GET _args 0 _tmp) -      if("${_tmp}" STREQUAL "SUBDIR") -         list(GET _args 1 dirname ) -         list(REMOVE_AT _args 0 1) -      endif("${_tmp}" STREQUAL "SUBDIR") -   endif(_args) - -   if(_installDest) -      install(FILES ${_outdoc} DESTINATION ${_installDest}/man${_section}) -   endif(_installDest) -endmacro (KDE4_CREATE_MANPAGE) - - -macro (KDE4_UPDATE_ICONCACHE) -    # Update mtime of hicolor icon theme dir. -    # We don't always have touch command (e.g. on Windows), so instead create -    #  and delete a temporary file in the theme dir. -   install(CODE " -    set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") -    if (NOT DESTDIR_VALUE) -        file(WRITE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\") -        file(REMOVE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\") -    endif (NOT DESTDIR_VALUE) -    ") -endmacro (KDE4_UPDATE_ICONCACHE) - -# a "map" of short type names to the directories -# unknown names should give empty results -# KDE 3 compatibility -set(_KDE4_ICON_GROUP_mime       "mimetypes") -set(_KDE4_ICON_GROUP_filesys    "places") -set(_KDE4_ICON_GROUP_device     "devices") -set(_KDE4_ICON_GROUP_app        "apps") -set(_KDE4_ICON_GROUP_action     "actions") -# KDE 4 / icon naming specification compatibility -set(_KDE4_ICON_GROUP_mimetypes  "mimetypes") -set(_KDE4_ICON_GROUP_places     "places") -set(_KDE4_ICON_GROUP_devices    "devices") -set(_KDE4_ICON_GROUP_apps       "apps") -set(_KDE4_ICON_GROUP_actions    "actions") -set(_KDE4_ICON_GROUP_categories "categories") -set(_KDE4_ICON_GROUP_status     "status") -set(_KDE4_ICON_GROUP_emblems    "emblems") -set(_KDE4_ICON_GROUP_emotes     "emotes") -set(_KDE4_ICON_GROUP_animations "animations") -set(_KDE4_ICON_GROUP_intl       "intl") - -# a "map" of short theme names to the theme directory -set(_KDE4_ICON_THEME_ox "oxygen") -set(_KDE4_ICON_THEME_cr "crystalsvg") -set(_KDE4_ICON_THEME_lo "locolor") -set(_KDE4_ICON_THEME_hi "hicolor") - - -# only used internally by KDE4_INSTALL_ICONS -macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME _l10n_SUBDIR) - -   # if the string doesn't match the pattern, the result is the full string, so all three have the same content -   if (NOT ${_group} STREQUAL ${_install_NAME} ) -      set(_icon_GROUP  ${_KDE4_ICON_GROUP_${_group}}) -      if(NOT _icon_GROUP) -         set(_icon_GROUP "actions") -      endif(NOT _icon_GROUP) -#      message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name} l10n: ${_l10n_SUBDIR}") -      install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/${_l10n_SUBDIR}/ RENAME ${_install_NAME} ) -   endif (NOT ${_group} STREQUAL ${_install_NAME} ) - -endmacro (_KDE4_ADD_ICON_INSTALL_RULE) - - -macro (KDE4_INSTALL_ICONS _defaultpath ) - -   # the l10n-subdir if language given as second argument (localized icon) -   set(_lang ${ARGV1}) -   if(_lang) -      set(_l10n_SUBDIR l10n/${_lang}) -   else(_lang) -      set(_l10n_SUBDIR ".") -   endif(_lang) - -   # first the png icons -   file(GLOB _icons *.png) -   foreach (_current_ICON ${_icons} ) -      # since CMake 2.6 regex matches are stored in special variables CMAKE_MATCH_x, if it didn't match, they are empty -      string(REGEX MATCH "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" _dummy  "${_current_ICON}") -      set(_type  "${CMAKE_MATCH_1}") -      set(_size  "${CMAKE_MATCH_2}") -      set(_group "${CMAKE_MATCH_3}") -      set(_name  "${CMAKE_MATCH_4}") - -      set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -      if( _theme_GROUP) -         _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -                    ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -                    ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -      endif( _theme_GROUP) -   endforeach (_current_ICON) - -   # mng icons -   file(GLOB _icons *.mng) -   foreach (_current_ICON ${_icons} ) -      # since CMake 2.6 regex matches are stored in special variables CMAKE_MATCH_x, if it didn't match, they are empty -      string(REGEX MATCH "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" _dummy  "${_current_ICON}") -      set(_type  "${CMAKE_MATCH_1}") -      set(_size  "${CMAKE_MATCH_2}") -      set(_group "${CMAKE_MATCH_3}") -      set(_name  "${CMAKE_MATCH_4}") - -      set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -      if( _theme_GROUP) -         _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -                ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -                ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -      endif( _theme_GROUP) -   endforeach (_current_ICON) - -   # and now the svg icons -   file(GLOB _icons *.svgz) -   foreach (_current_ICON ${_icons} ) -      # since CMake 2.6 regex matches are stored in special variables CMAKE_MATCH_x, if it didn't match, they are empty -      string(REGEX MATCH "^.*/([a-zA-Z]+)sc\\-([a-z]+)\\-(.+\\.svgz)$" _dummy "${_current_ICON}") -      set(_type  "${CMAKE_MATCH_1}") -      set(_group "${CMAKE_MATCH_2}") -      set(_name  "${CMAKE_MATCH_3}") - -      set(_theme_GROUP ${_KDE4_ICON_THEME_${_type}}) -      if( _theme_GROUP) -          _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake -                            ${_defaultpath}/${_theme_GROUP}/scalable -                            ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) -      endif( _theme_GROUP) -   endforeach (_current_ICON) - -   kde4_update_iconcache() - -endmacro (KDE4_INSTALL_ICONS) - - -# For all C++ sources a big source file which includes all the files -# is created. -# This is not done for the C sources, they are just gathered in a separate list -# because they are usually not written by KDE and as such not intended to be -# compiled all-in-one. -macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile ) -   set(${_filesExcludedFromFinalFile}) -   file(WRITE "${_filenameCPP}" "//autogenerated file\n") -   foreach (_current_FILE ${ARGN}) -      get_filename_component(_abs_FILE "${_current_FILE}" ABSOLUTE) -      # don't include any generated files in the final-file -      # because then cmake will not know the dependencies -      get_source_file_property(_isGenerated "${_abs_FILE}" GENERATED) -      if (_isGenerated) -         list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") -      else (_isGenerated) -         # only put C++ files in the final-file -         if("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -            file(APPEND "${_filenameCPP}" "#include \"${_abs_FILE}\"\n") -         else("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -            list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") -         endif("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") -      endif (_isGenerated) -   endforeach (_current_FILE) - -endmacro (KDE4_CREATE_FINAL_FILES) - -# This macro doesn't set up the RPATH related options for executables anymore, -# since now (wioth cmake 2.6) just the full RPATH is used always for everything. -# It does create wrapper shell scripts for the executables. -# It overrides the defaults set in FindKDE4Internal.cmake. -# For every executable a wrapper script is created, which sets the appropriate -# environment variable for the platform (LD_LIBRARY_PATH on most UNIX systems, -# DYLD_LIBRARY_PATH on OS X and PATH in Windows) so  that it points to the built -# but not yet installed versions of the libraries. So if RPATH is disabled, the executables -# can be run via these scripts from the build tree and will find the correct libraries. -# If RPATH is not disabled, these scripts are also used but only for consistency, because -# they don't really influence anything then, because the compiled-in RPATH overrides -# the LD_LIBRARY_PATH env. variable. -macro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE _target_NAME) -   if (UNIX) -      if (APPLE) -         set(_library_path_variable "DYLD_LIBRARY_PATH") -      elseif (CYGWIN) -         set(_library_path_variable "PATH") -      else (APPLE) -         set(_library_path_variable "LD_LIBRARY_PATH") -      endif (APPLE) - -      if (APPLE) -         # DYLD_LIBRARY_PATH does not work like LD_LIBRARY_PATH -         # OSX already has the RPATH in libraries and executables, putting runtime directories in -         # DYLD_LIBRARY_PATH actually breaks things -         set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${KDE4_LIB_DIR}") -      else (APPLE) -         set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${LIB_INSTALL_DIR}:${KDE4_LIB_DIR}:${QT_LIBRARY_DIR}") -      endif (APPLE) -      get_target_property(_executable ${_target_NAME} LOCATION ) - -      # use add_custom_target() to have the sh-wrapper generated during build time instead of cmake time -      add_custom_command(TARGET ${_target_NAME} POST_BUILD -         COMMAND ${CMAKE_COMMAND} -         -D_filename=${_executable}.shell -D_library_path_variable=${_library_path_variable} -         -D_ld_library_path="${_ld_library_path}" -D_executable=${_executable} -         -P ${KDE4_MODULE_DIR}/kde4_exec_via_sh.cmake -         ) - -      macro_additional_clean_files(${_executable}.shell) - -      # under UNIX, set the property WRAPPER_SCRIPT to the name of the generated shell script -      # so it can be queried and used later on easily -      set_target_properties(${_target_NAME} PROPERTIES WRAPPER_SCRIPT ${_executable}.shell) - -   else (UNIX) -      # under windows, set the property WRAPPER_SCRIPT just to the name of the executable -      # maybe later this will change to a generated batch file (for setting the PATH so that the Qt libs are found) -      get_target_property(_executable ${_target_NAME} LOCATION ) -      set_target_properties(${_target_NAME} PROPERTIES WRAPPER_SCRIPT ${_executable}) - -      set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}\;${LIB_INSTALL_DIR}\;${KDE4_LIB_DIR}\;${QT_LIBRARY_DIR}") -      get_target_property(_executable ${_target_NAME} LOCATION ) - -      # use add_custom_target() to have the batch-file-wrapper generated during build time instead of cmake time -      add_custom_command(TARGET ${_target_NAME} POST_BUILD -         COMMAND ${CMAKE_COMMAND} -         -D_filename="${_executable}.bat" -         -D_ld_library_path="${_ld_library_path}" -D_executable="${_executable}" -         -P ${KDE4_MODULE_DIR}/kde4_exec_via_sh.cmake -         ) - -   endif (UNIX) -endmacro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE) - - -macro (KDE4_ADD_PLUGIN _target_NAME ) -#if the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, -#otherwise set the prefix empty - -   set(_args ${ARGN}) -   # default to module -   set(_add_lib_param "MODULE") -   set(_with_pre FALSE) -    -   foreach(arg ${_args}) -      if (arg STREQUAL "WITH_PREFIX") -         set(_with_pre TRUE) -      endif (arg STREQUAL "WITH_PREFIX") -      if (arg STREQUAL "STATIC") -         set(_add_lib_param STATIC) -      endif (arg STREQUAL "STATIC") -      if (arg STREQUAL "SHARED") -         set(_add_lib_param SHARED) -      endif (arg STREQUAL "SHARED") -      if (arg STREQUAL "MODULE") -         set(_add_lib_param MODULE) -      endif (arg STREQUAL "MODULE") -   endforeach(arg) - -   if(_with_pre) -      list(REMOVE_ITEM _args "WITH_PREFIX") -   endif(_with_pre) -   if(_add_lib_param STREQUAL "STATIC") -      list(REMOVE_ITEM _args "STATIC") -   endif(_add_lib_param STREQUAL "STATIC") -   if (_add_lib_param STREQUAL "SHARED") -      list(REMOVE_ITEM _args "SHARED") -   endif (_add_lib_param STREQUAL "SHARED") -   if (_add_lib_param STREQUAL "MODULE") -       list(REMOVE_ITEM _args "MODULE") -   endif (_add_lib_param STREQUAL "MODULE") - -   set(_SRCS ${_args}) - -   _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS) - -   if("${_add_lib_param}" STREQUAL "STATIC") -      add_definitions(-DQT_STATICPLUGIN) -   endif("${_add_lib_param}" STREQUAL "STATIC") - -   if (KDE4_ENABLE_FINAL) -      kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -      add_library(${_target_NAME} ${_add_lib_param}   ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -   else (KDE4_ENABLE_FINAL) -      add_library(${_target_NAME} ${_add_lib_param}  ${_SRCS}) -   endif (KDE4_ENABLE_FINAL) - -   _automoc4_kde4_post_target_handling(${_target_NAME}) - -   if (NOT _with_pre) -      set_target_properties(${_target_NAME} PROPERTIES PREFIX "") -   endif (NOT _with_pre) - -   # for shared libraries/plugins a -DMAKE_target_LIB is required -   string(TOUPPER ${_target_NAME} _symbol) -   string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _symbol ${_symbol}) -   set(_symbol "MAKE_${_symbol}_LIB") -   set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol}) - -endmacro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX) - - -# this macro is intended to check whether a list of source -# files has the "NOGUI" or "RUN_UNINSTALLED" keywords at the beginning -# in _output_LIST the list of source files is returned with the "NOGUI" -# and "RUN_UNINSTALLED" keywords removed -# if "NOGUI" is in the list of files, the _nogui argument is set to -# "NOGUI" (which evaluates to TRUE in cmake), otherwise it is set empty -# (which evaluates to FALSE in cmake) -# "RUN_UNINSTALLED" in the list of files is ignored, it is not necessary anymore -# since KDE 4.2 (with cmake 2.6.2), since then all executables are always built -# with RPATH pointing into the build dir. -# if "TEST" is in the list of files, the _test argument is set to -# "TEST" (which evaluates to TRUE in cmake), otherwise it is set empty -# (which evaluates to FALSE in cmake) -macro(KDE4_CHECK_EXECUTABLE_PARAMS _output_LIST _nogui _test) -   set(${_nogui}) -   set(${_test}) -   set(${_output_LIST} ${ARGN}) -   list(LENGTH ${_output_LIST} count) - -   list(GET ${_output_LIST} 0 first_PARAM) - -   set(second_PARAM "NOTFOUND") -   if (${count} GREATER 1) -      list(GET ${_output_LIST} 1 second_PARAM) -   endif (${count} GREATER 1) - -   set(remove "NOTFOUND") - -   if (${first_PARAM} STREQUAL "NOGUI") -      set(${_nogui} "NOGUI") -      set(remove 0) -   endif (${first_PARAM} STREQUAL "NOGUI") - -   if (${first_PARAM} STREQUAL "RUN_UNINSTALLED") -      set(remove 0) -   endif (${first_PARAM} STREQUAL "RUN_UNINSTALLED") - -   if (${first_PARAM} STREQUAL "TEST") -      set(${_test} "TEST") -      set(remove 0) -   endif (${first_PARAM} STREQUAL "TEST") - -   if (${second_PARAM} STREQUAL "NOGUI") -      set(${_nogui} "NOGUI") -      set(remove 0;1) -   endif (${second_PARAM} STREQUAL "NOGUI") - -   if (${second_PARAM} STREQUAL "RUN_UNINSTALLED") -      set(remove 0;1) -   endif (${second_PARAM} STREQUAL "RUN_UNINSTALLED") - -   if (${second_PARAM} STREQUAL "TEST") -      set(${_test} "TEST") -      set(remove 0;1) -   endif (${second_PARAM} STREQUAL "TEST") - - -   if (NOT "${remove}" STREQUAL "NOTFOUND") -      list(REMOVE_AT ${_output_LIST} ${remove}) -   endif (NOT "${remove}" STREQUAL "NOTFOUND") - -endmacro(KDE4_CHECK_EXECUTABLE_PARAMS) - - -macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) - -   kde4_check_executable_params(_SRCS _nogui _test ${ARGN}) - -   configure_file(${KDE4_MODULE_DIR}/kde4init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) -   set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp PROPERTIES SKIP_AUTOMOC TRUE) -   # under Windows, build a normal executable and additionally a dummy kdeinit4_foo.lib, whose only purpose on windows is to  -   # keep the linking logic from the CMakeLists.txt on UNIX working (under UNIX all necessary libs are linked against the kdeinit -   # library instead against the executable, under windows we want to have everything in the executable, but for compatibility we have to  -   # keep the library there- -   if(WIN32) -      if (MINGW) -         list(FIND _SRCS ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_res.o _res_position) -      else(MINGW) -         list(FIND _SRCS ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}.rc _res_position) -      endif(MINGW) -      if(NOT _res_position EQUAL -1) -         list(GET _SRCS ${_res_position} _resourcefile) -         list(REMOVE_AT _SRCS ${_res_position}) -      endif(NOT _res_position EQUAL -1) - -      set(_KDEINIT4_TARGET_NAME_ ${_target_NAME}) -      string(REGEX REPLACE "[-]" "_" _KDEINIT4_TARGET_NAME_ "${_KDEINIT4_TARGET_NAME_}") -      configure_file(${KDE4_MODULE_DIR}/kde4init_win32lib_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) -      add_library(kdeinit_${_target_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) - -      if (KDE4_ENABLE_FINAL) -         kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -         kde4_add_executable(${_target_NAME} "${_nogui}" ${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp ${_separate_files} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp ${_resourcefile}) - -      else (KDE4_ENABLE_FINAL) -         kde4_add_executable(${_target_NAME} "${_nogui}" ${_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp ${_resourcefile}) -      endif (KDE4_ENABLE_FINAL) - -      set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME}) - -      target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY} kdeinit_${_target_NAME}) -   else(WIN32) -      _automoc4_kde4_pre_target_handling(kdeinit_${_target_NAME} _SRCS) - -      if (KDE4_ENABLE_FINAL) -         kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -         add_library(kdeinit_${_target_NAME} SHARED  ${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp ${_separate_files}) - -      else (KDE4_ENABLE_FINAL) -         add_library(kdeinit_${_target_NAME} SHARED ${_SRCS}) -      endif (KDE4_ENABLE_FINAL) - -      _automoc4_kde4_post_target_handling(kdeinit_${_target_NAME}) - -      set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME}) - -      kde4_add_executable(${_target_NAME} "${_nogui}" ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) -      target_link_libraries(${_target_NAME} kdeinit_${_target_NAME}) -   endif(WIN32) - -endmacro (KDE4_ADD_KDEINIT_EXECUTABLE) - -# Add a unit test, which is executed when running make test . -# The targets are always created, but only built for the "all" -# target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target -# are created but not built by default. You can build them by manually building the target. -# The name of the target can be specified using TESTNAME <testname>, if it is not given -# the macro will default to the <name> -macro (KDE4_ADD_UNIT_TEST _test_NAME) -    set(_srcList ${ARGN}) -    set(_targetName ${_test_NAME}) -    if( ${ARGV1} STREQUAL "TESTNAME" ) -        set(_targetName ${ARGV2}) -        list(REMOVE_AT _srcList 0 1) -    endif( ${ARGV1} STREQUAL "TESTNAME" ) -     -    set(_nogui) -    list(GET ${_srcList} 0 first_PARAM) -    if( ${first_PARAM} STREQUAL "NOGUI" ) -        set(_nogui "NOGUI") -    endif( ${first_PARAM} STREQUAL "NOGUI" ) - -    kde4_add_executable( ${_test_NAME} TEST ${_srcList} ) - -    if(NOT KDE4_TEST_OUTPUT) -        set(KDE4_TEST_OUTPUT plaintext) -    endif(NOT KDE4_TEST_OUTPUT) -    set(KDE4_TEST_OUTPUT ${KDE4_TEST_OUTPUT} CACHE STRING "The output to generate when running the QTest unit tests") - -    set(using_qtest "") -    foreach(_filename ${_srcList}) -        if(NOT using_qtest) -            if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_filename}") -                file(READ ${_filename} file_CONTENT) -                string(REGEX MATCH "QTEST_(KDE)?MAIN" using_qtest "${file_CONTENT}") -            endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_filename}") -        endif(NOT using_qtest) -    endforeach(_filename) - -    get_target_property( loc ${_test_NAME} LOCATION ) -    if(WIN32) -      if(MSVC_IDE) -        STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}" loc "${loc}") -      endif() -      # .bat because of rpath handling -      set(_executable "${loc}.bat") -    else(WIN32) -      if (Q_WS_MAC AND NOT _nogui) -        set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME}.app/Contents/MacOS/${_test_NAME}) -      else (Q_WS_MAC AND NOT _nogui) -        # .shell because of rpath handling -        set(_executable "${loc}.shell") -      endif (Q_WS_MAC AND NOT _nogui) -    endif(WIN32) -     -    if (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -        #MESSAGE(STATUS "${_targetName} : Using QTestLib, can produce XML report.") -        add_test( ${_targetName} ${_executable} -xml -o ${_targetName}.tml) -    else (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") -        #MESSAGE(STATUS "${_targetName} : NOT using QTestLib, can't produce XML report, please use QTestLib to write your unit tests.") -        add_test( ${_targetName} ${_executable} ) -    endif (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") - -#    add_test( ${_targetName} ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME} -xml -o ${_test_NAME}.tml ) - -    if (NOT MSVC_IDE)   #not needed for the ide -        # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests -        if (NOT KDE4_BUILD_TESTS) -           get_directory_property(_buildtestsAdded BUILDTESTS_ADDED) -           if(NOT _buildtestsAdded) -              add_custom_target(buildtests) -              set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE) -           endif(NOT _buildtestsAdded) -           add_dependencies(buildtests ${_test_NAME}) -        endif (NOT KDE4_BUILD_TESTS) -    endif (NOT MSVC_IDE) - -endmacro (KDE4_ADD_UNIT_TEST) - - -# add a  manifest file to executables.  -#  -# There is a henn-egg problem when a target runtime part is renamed using  -# the OUTPUT_NAME option of cmake's set_target_properties command.  -# -# At now the Makefiles rules creating for manifest adding are performed  -# *after* the cmake's add_executable command but *before* an optional  -# set_target_properties command.  -# This means that in KDE4_ADD_MANIFEST the LOCATION property contains  -#  the unchanged runtime part name of the target. :-( -#  -# The recently used workaround is to specify a variable build off the target name followed  -# by _OUTPUT_NAME before calling kde4_add_executable as shown in the following example:  -#  -# set(xyz_OUTPUT_NAME test) -# kde4_add_executable( xyz <source>) -# set_target_properties( xyz PROPERTIES OUTPUT_NAME ${xyz_OUTPUT_NAME} )   -# -# The full solution would be to introduce a kde4_target_link_libraries macro and to  -# call KDE4_ADD_MANIFEST inside instead of calling in kde4_add_executable.  -# This would require patching of *all* places in the KDE sources where target_link_libraries  -# is used and to change the related docs. -#  -# Because yet I found only 2 locations where this problem occurs (kjs, k3b), the workaround  -# seems to be a pragmatically solution.  -#  -# This macro is an internal macro only used by kde4_add_executable -# -macro (_KDE4_ADD_MANIFEST _target_NAME) -    set(x ${_target_NAME}_OUTPUT_NAME) -    if (${x}) -        get_target_property(_var ${_target_NAME} LOCATION ) -        string(REPLACE "${_target_NAME}" "${${x}}" _executable ${_var}) -    else(${x}) -        get_target_property(_executable ${_target_NAME} LOCATION ) -    endif(${x}) -         -    if (_kdeBootStrapping) -        set(_cmake_module_path ${CMAKE_SOURCE_DIR}/cmake/modules) -    else (_kdeBootStrapping) -        set(_cmake_module_path ${KDE4_INSTALL_DIR}/share/apps/cmake/modules) -    endif (_kdeBootStrapping) -        -    set(_manifest ${_cmake_module_path}/Win32.Manifest.in) -    #message(STATUS ${_executable} ${_manifest}) -    add_custom_command( -        TARGET ${_target_NAME} -        POST_BUILD -        COMMAND ${KDE4_MT_EXECUTABLE} -        ARGS -           -manifest ${_manifest} -           -updateresource:${_executable} -        COMMENT "adding vista trustInfo manifest to ${_target_NAME}" -   ) -endmacro(_KDE4_ADD_MANIFEST)  - - -macro (KDE4_ADD_EXECUTABLE _target_NAME) - -   kde4_check_executable_params( _SRCS _nogui _test ${ARGN}) - -   set(_add_executable_param) - -   # determine additional parameters for add_executable() -   # for GUI apps, create a bundle on OSX -   if (Q_WS_MAC) -      set(_add_executable_param MACOSX_BUNDLE) -   endif (Q_WS_MAC) - -   # for GUI apps, this disables the additional console under Windows -   if (WIN32) -      set(_add_executable_param WIN32) -   endif (WIN32) - -   if (_nogui) -      set(_add_executable_param) -   endif (_nogui) - -   if (_test AND NOT KDE4_BUILD_TESTS) -      set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL) -   endif (_test AND NOT KDE4_BUILD_TESTS) - -   _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS) -    -   if (KDE4_ENABLE_FINAL) -      kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -      add_executable(${_target_NAME} ${_add_executable_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -   else (KDE4_ENABLE_FINAL) -      add_executable(${_target_NAME} ${_add_executable_param} ${_SRCS}) -   endif (KDE4_ENABLE_FINAL) - -   IF (KDE4_ENABLE_UAC_MANIFEST) -       _kde4_add_manifest(${_target_NAME}) -   ENDIF(KDE4_ENABLE_UAC_MANIFEST) - -   _automoc4_kde4_post_target_handling(${_target_NAME}) - -   if (_test) -      set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\"") -   endif (_test) - -   kde4_handle_rpath_for_executable(${_target_NAME}) - -   if (WIN32) -      target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY}) -   endif (WIN32) - -endmacro (KDE4_ADD_EXECUTABLE) - - -macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) - -   set(_first_SRC ${_lib_TYPE}) -   set(_add_lib_param) - -   if (${_lib_TYPE} STREQUAL "STATIC") -      set(_first_SRC) -      set(_add_lib_param STATIC) -   endif (${_lib_TYPE} STREQUAL "STATIC") -   if (${_lib_TYPE} STREQUAL "SHARED") -      set(_first_SRC) -      set(_add_lib_param SHARED) -   endif (${_lib_TYPE} STREQUAL "SHARED") -   if (${_lib_TYPE} STREQUAL "MODULE") -      set(_first_SRC) -      set(_add_lib_param MODULE) -   endif (${_lib_TYPE} STREQUAL "MODULE") - -   set(_SRCS ${_first_SRC} ${ARGN}) - -   _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS) - -   if (KDE4_ENABLE_FINAL) -      kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) -      add_library(${_target_NAME} ${_add_lib_param}  ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) -   else (KDE4_ENABLE_FINAL) -      add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) -   endif (KDE4_ENABLE_FINAL) - -   _automoc4_kde4_post_target_handling(${_target_NAME}) - -   # for shared libraries a -DMAKE_target_LIB is required -   string(TOUPPER ${_target_NAME} _symbol) -   string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _symbol ${_symbol}) -   set(_symbol "MAKE_${_symbol}_LIB") -   set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol}) - -   # By default don't add any linked libraries to the "exported" -   # link interfaces, so that executables linking against this library -   # will not automatically add implicit dependencies to their link list. -   # -   # This reduces inter-package dependencies and makes it easier to remove -   # dependencies of shared libraries without breaking binary compatibility. -   if(NOT "${_add_lib_param}" STREQUAL "STATIC") -      set_target_properties(${_target_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "" ) -   endif(NOT "${_add_lib_param}" STREQUAL "STATIC") - -endmacro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) - -macro (KDE4_ADD_WIDGET_FILES _sources) -   foreach (_current_FILE ${ARGN}) - -      get_filename_component(_input ${_current_FILE} ABSOLUTE) -      get_filename_component(_basename ${_input} NAME_WE) -      set(_source ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.cpp) -      set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.moc) - -      # create source file from the .widgets file -      add_custom_command(OUTPUT ${_source} -        COMMAND ${KDE4_MAKEKDEWIDGETS_EXECUTABLE} -        ARGS -o ${_source} ${_input} -        MAIN_DEPENDENCY ${_input} DEPENDS ${_KDE4_MAKEKDEWIDGETS_DEP}) - -      # create moc file -      qt4_generate_moc(${_source} ${_moc} ) - -      list(APPEND ${_sources} ${_source} ${_moc}) - -   endforeach (_current_FILE) - -endmacro (KDE4_ADD_WIDGET_FILES) - - -macro(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) -# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex -   install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake ) -   set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules ) - -   file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, dont edit\n\n") -   foreach ( _current_FILE ${ARGN}) -      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${module_install_dir}/${_current_FILE}\" )\n" ) -      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${module_install_dir}/${_current_FILE} OUTPUT_VARIABLE _dummy)\n" ) -   endforeach ( _current_FILE) - -endmacro(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) - - -macro(KDE4_NO_ENABLE_FINAL _project_name) -   if(KDE4_ENABLE_FINAL) -      set(KDE4_ENABLE_FINAL OFF) -      remove_definitions(-DKDE_USE_FINAL) -      message(STATUS "You used enable-final argument but \"${_project_name}\" doesn't support it. Try to fix compile it and remove KDE4_NO_ENABLE_FINAL macro. Thanks") - -   endif(KDE4_ENABLE_FINAL) -endmacro(KDE4_NO_ENABLE_FINAL _project_name) - - -macro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) -   string(TOUPPER ${_libName} _libNameUpperCase) -   string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _libNameUpperCase ${_libNameUpperCase}) -   # the next line is is required, because in CMake arguments to macros are not real -   # variables, but handled differently. The next line create a real CMake variable, -   # so configure_file() will replace it correctly. -   set(_libName ${_libName}) -   # compared to write(FILE) configure_file() only really writes the file if the -   # contents have changed. Otherwise we would have a lot of recompiles. -   configure_file(${KDE4_MODULE_DIR}/kde4exportsheader.h.in ${_outputFile}) -endmacro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) - - -macro (KDE4_CREATE_HTML_HANDBOOK _docbook) -   message(STATUS "KDE4_CREATE_HTML_HANDBOOK() is deprecated. Enable the option KDE4_ENABLE_HTMLHANDBOOK instead, this will give you targets htmlhandbook for creating the html help.") -endmacro (KDE4_CREATE_HTML_HANDBOOK) - - -# adds application icon to target source list -# 'appsources' - the sources of the application -# 'pngfiles' - specifies the list of icon files -# example: KDE4_ADD_WIN32_APP_ICON(myapp_SRCS "pics/cr16-myapp.png;pics/cr32-myapp.png") - -macro (KDE4_ADD_WIN32_APP_ICON appsources) -    message(STATUS "KDE4_ADD_WIN32_APP_ICON() is deprecated, use KDE4_ADD_APP_ICON() instead") -    if (WIN32) -        if(NOT WINCE) -        find_program(PNG2ICO_EXECUTABLE NAMES png2ico) -        else(NOT WINCE) -        find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH ) -        endif(NOT WINCE) -        find_program(WINDRES_EXECUTABLE NAMES windres) -        if(MSVC) -            set(WINDRES_EXECUTABLE TRUE) -        endif(MSVC) -        string(REPLACE _SRCS "" appname ${appsources}) -        if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -            set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appname}) - -            # png2ico is found by the above find_program -#            message("png2ico ${_outfilename}.ico ${ARGN}") -            exec_program(png2ico ARGS ${_outfilename}.ico ${ARGN}) - -            # now make rc file for adding it to the sources -            file(WRITE ${_outfilename}.rc "IDI_ICON1        ICON        DISCARDABLE    \"${_outfilename}.ico\"\n") -            if (MINGW) -                exec_program(windres -                    ARGS "-i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR}") -                list(APPEND ${appsources} ${CMAKE_CURRENT_BINARY_DIR}/${appname}_res.o) -            else(MINGW) -                list(APPEND ${appsources} ${CMAKE_CURRENT_BINARY_DIR}/${appname}.rc) -            endif(MINGW) -        endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -    endif(WIN32) -endmacro (KDE4_ADD_WIN32_APP_ICON) - -# adds application icon to target source list  -# for detailed documentation see the top of FindKDE4Internal.cmake -macro (KDE4_ADD_APP_ICON appsources pattern) -    set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appsources}) - -    if (WIN32) -        if(NOT WINCE) -        find_program(PNG2ICO_EXECUTABLE NAMES png2ico) -        else(NOT WINCE) -        find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH ) -        endif(NOT WINCE) -        find_program(WINDRES_EXECUTABLE NAMES windres) -        if(MSVC) -            set(WINDRES_EXECUTABLE TRUE) -        endif(MSVC) -        if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -            string(REPLACE "*" "(.*)" pattern_rx "${pattern}") -            file(GLOB files  "${pattern}") -            foreach (it ${files}) -                string(REGEX REPLACE "${pattern_rx}" "\\1" fn "${it}") -                if (fn MATCHES ".*16.*" ) -                    list (APPEND _icons ${it}) -                endif (fn MATCHES ".*16.*") -                if (fn MATCHES ".*32.*" ) -                    list (APPEND _icons ${it}) -                endif (fn MATCHES ".*32.*") -                if (fn MATCHES ".*48.*" ) -                    list (APPEND _icons ${it}) -                endif (fn MATCHES ".*48.*") -                if (fn MATCHES ".*64.*" ) -                    list (APPEND _icons ${it}) -                endif (fn MATCHES ".*64.*") -                if (fn MATCHES ".*128.*" ) -                    list (APPEND _icons ${it}) -                endif (fn MATCHES ".*128.*") -            endforeach (it) -            if (_icons) -                add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc -                                   COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons} -                                   DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons} -                                   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -                                  ) -                if (MINGW) -                    add_custom_command(OUTPUT ${_outfilename}_res.o -                                       COMMAND ${WINDRES_EXECUTABLE} ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR} -                                       DEPENDS ${WINDRES_EXECUTABLE} ${_outfilename}.rc -                                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -                                      ) -                    list(APPEND ${appsources} ${_outfilename}_res.o) -                else(MINGW) -                    list(APPEND ${appsources} ${_outfilename}.rc) -                endif(MINGW) -            else(_icons) -                message(STATUS "Unable to find a related icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!") -            endif(_icons) -        else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -            message(STATUS "Unable to find the png2ico or windres utilities - application will not have an application icon!") -        endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) -    endif(WIN32) -    if (Q_WS_MAC) -        # first convert image to a tiff using the Mac OS X "sips" utility, -        # then use tiff2icns to convert to an icon -        find_program(SIPS_EXECUTABLE NAMES sips) -        find_program(TIFF2ICNS_EXECUTABLE NAMES tiff2icns) -        if (SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -            file(GLOB_RECURSE files  "${pattern}") -            # we can only test for the 128-icon like that - we don't use patterns anymore -            foreach (it ${files}) -                if (it MATCHES ".*128.*" ) -                    set (_icon ${it}) -                endif (it MATCHES ".*128.*") -            endforeach (it) - -            if (_icon) -                 -                # first, get the basename of our app icon -                add_custom_command(OUTPUT ${_outfilename}.icns ${outfilename}.tiff -                                   COMMAND ${SIPS_EXECUTABLE} -s format tiff ${_icon} --out ${outfilename}.tiff -                                   COMMAND ${TIFF2ICNS_EXECUTABLE} ${outfilename}.tiff ${_outfilename}.icns -                                   DEPENDS ${_icon} -                                   ) - -                # This will register the icon into the bundle -                set(MACOSX_BUNDLE_ICON_FILE ${appsources}.icns) - -                # Append the icns file to the sources list so it will be a dependency to the -                # main target -                list(APPEND ${appsources} ${_outfilename}.icns) - -                # Install the icon into the Resources dir in the bundle -                set_source_files_properties(${_outfilename}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - -            else(_icon) -                # TODO - try to scale a non-128 icon...? Try to convert an SVG on the fly? -                message(STATUS "Unable to find an 128x128 icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!") -            endif(_icon) - -        else(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -            message(STATUS "Unable to find the sips and tiff2icns utilities - application will not have an application icon!") -        endif(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) -    endif(Q_WS_MAC) -endmacro (KDE4_ADD_APP_ICON) - - -# This macro is only kept around for compatibility, it is not needed/used anymore -# since CMake 2.6.0. With CMake 2.6.0 it is not necessary anymore link libraries again -# ("relink") to change their RPATH. Since this is fast now, they are now always built with -# full RPATH.  -# Still keep this macro here, since somebody might use it and so that would break -# if we would just remove it from here. -# What it does now it sets the target properties of the given target the same way as -# they were set by the old version of the macro with the option FULL_RPATH enabled. -# This one may be a candidate for removal. Alex -macro (KDE4_HANDLE_RPATH_FOR_LIBRARY _target_NAME) -   message(STATUS "You are using the macro KDE4_HANDLE_RPATH_FOR_LIBRARY(), which is an internal macro and shouldn't be used by external projects. Please remove it.") -   if (NOT CMAKE_SKIP_RPATH) -      set_target_properties(${_target_NAME} PROPERTIES  SKIP_BUILD_RPATH FALSE  BUILD_WITH_INSTALL_RPATH FALSE) -   endif (NOT CMAKE_SKIP_RPATH) -endmacro (KDE4_HANDLE_RPATH_FOR_LIBRARY) - -# This macro adds the needed files for an helper executable meant to be used by applications using KAuth. -# It accepts the helper target, the helper ID (the DBUS name) and the user under which the helper will run on. -# This macro takes care of generate the needed files, and install them in the right location. This boils down -# to a DBus policy to let the helper register on the system bus, and a service file for letting the helper -# being automatically activated by the system bus. -# *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work. -function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID HELPER_USER) -    if(KDE4_AUTH_HELPER_BACKEND_NAME STREQUAL "DBUS") -        if (_kdeBootStrapping) -            set(_stubFilesDir  ${CMAKE_SOURCE_DIR}/kdecore/auth/backends/dbus/ ) -        else (_kdeBootStrapping) -            set(_stubFilesDir  ${KDE4_DATA_INSTALL_DIR}/kauth/ ) -        endif (_kdeBootStrapping) - -        configure_file(${_stubFilesDir}/dbus_policy.stub -                        ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf) -        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf -                DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/) - -        configure_file(${_stubFilesDir}/dbus_service.stub -                        ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service) -        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service -                DESTINATION ${DBUS_SYSTEM_SERVICES_INSTALL_DIR}) -    endif(KDE4_AUTH_HELPER_BACKEND_NAME STREQUAL "DBUS") -endfunction(KDE4_INSTALL_AUTH_HELPER_FILES) - -# This macro generates an action file, depending on the backend used, for applications using KAuth. -# It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example -# for file format). The macro will take care of generating the file according to the backend specified,  -# and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy -# file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/), -# and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during -# the install phase -function(KDE4_INSTALL_AUTH_ACTIONS HELPER_ID ACTIONS_FILE) - -  if(KDE4_AUTH_BACKEND_NAME STREQUAL "APPLE") -    install(CODE "execute_process(COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${ACTIONS_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") -  elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT" OR KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1") -    set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy) -    get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE) - -    add_custom_command(OUTPUT ${_output}  -                       COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${_input} > ${_output}  -                       MAIN_DEPENDENCY ${_input} -                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -                       COMMENT "Generating ${HELPER_ID}.policy" -                       DEPENDS ${_KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP}) -    add_custom_target("actions for ${HELPER_ID}" ALL DEPENDS ${_output}) - -    install(FILES ${_output} DESTINATION ${KDE4_AUTH_POLICY_FILES_INSTALL_DIR}) -  endif() - -endfunction(KDE4_INSTALL_AUTH_ACTIONS) - - -macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) -   message(FATAL_ERROR "_KDE4_EXPORT_LIBRARY_DEPENDENCIES() was an internal macro and has been removed again. Just remove the code which calls it, there is no substitute.") -endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) - -macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) -   message(FATAL_ERROR "_KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") -endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) - -macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) -   message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") -endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) - -macro (KDE4_INSTALL_HANDBOOK _lang) -   message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.") -endmacro (KDE4_INSTALL_HANDBOOK ) - -macro (KDE4_SET_CUSTOM_TARGET_PROPERTY) -   message(FATAL_ERROR "KDE4_SET_CUSTOM_TARGET_PROPERTY() is deprecated, just use a simple variable instead") -endmacro (KDE4_SET_CUSTOM_TARGET_PROPERTY) - -macro (KDE4_GET_CUSTOM_TARGET_PROPERTY) -   message(FATAL_ERROR "KDE4_GET_CUSTOM_TARGET_PROPERTY() is deprecated, just use a simple variable instead") -endmacro (KDE4_GET_CUSTOM_TARGET_PROPERTY) diff --git a/attic/modules/kde4init_dummy.cpp.in b/attic/modules/kde4init_dummy.cpp.in deleted file mode 100644 index f0cd3488..00000000 --- a/attic/modules/kde4init_dummy.cpp.in +++ /dev/null @@ -1,3 +0,0 @@ -extern "C" int kdemain(int argc, char* argv[]); -extern "C" int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); } -int main(int argc, char* argv[]) { return kdemain(argc,argv); } diff --git a/attic/modules/kde4init_win32lib_dummy.cpp.in b/attic/modules/kde4init_win32lib_dummy.cpp.in deleted file mode 100644 index 0aa704bc..00000000 --- a/attic/modules/kde4init_win32lib_dummy.cpp.in +++ /dev/null @@ -1,5 +0,0 @@ -/* dummy file, used by KDE4_ADD_KDEINIT_EXECUTABLE() under Windows,  - * so that the created static library is not completely empty */ - -extern "C" int kdeinit_${_KDEINIT4_TARGET_NAME_}_dummy(void) { return 42; } - diff --git a/attic/modules/kde4uic.cmake b/attic/modules/kde4uic.cmake deleted file mode 100644 index ed328b40..00000000 --- a/attic/modules/kde4uic.cmake +++ /dev/null @@ -1,56 +0,0 @@ - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -#using a ui3 file with uic3 -if (KDE3_IMPL) - -  EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE} -    -nounload -tr tr2i18n -    -impl ${KDE_UIC_H_FILE} -    ${KDE_UIC_FILE} -    OUTPUT_VARIABLE _uic_CONTENTS -    ERROR_QUIET -  ) -endif (KDE3_IMPL) - - -if (KDE3_HEADER) - -  EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE} -    -nounload -tr tr2i18n -    ${KDE_UIC_FILE} -    OUTPUT_VARIABLE _uic_CONTENTS -    ERROR_QUIET -  ) -   set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE}) -endif (KDE3_HEADER) - -# the kde4 branch -if (KDE4_HEADER) - -  EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE} -    -tr tr2i18n -    ${KDE_UIC_FILE} -    OUTPUT_VARIABLE _uic_CONTENTS -  ) - -   set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE}) -endif (KDE4_HEADER) - - -IF (_uic_CONTENTS) -  #replace tr218n("") with QString::null to avoid warning from KLocale -  STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) -  STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) -  #replace image15_data with img15_filename to make enable_final work -  STRING(REGEX REPLACE "image([0-9]+)_data" "img\\1_${KDE_UIC_BASENAME}" _uic_CONTENTS "${_uic_CONTENTS}") -  #fixup include guard -  STRING(REGEX REPLACE "#ifndef " "#ifndef UI_" _uic_CONTENTS "${_uic_CONTENTS}") -  STRING(REGEX REPLACE "#define " "#define UI_" _uic_CONTENTS "${_uic_CONTENTS}") - -  FILE(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n${_uic_CONTENTS}\n") -ENDIF() - | 
