Scroll to navigation

kdecmake(1) General Commands Manual kdecmake(1)

NAME

kdecmake - Reference of available CMake custom modules.

DESCRIPTION

The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option. The -i option will cause cmake to interactively prompt for such settings.

CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.

CUSTOM MODULES

The following modules are also available for CMake. They can be used with INCLUDE(ModuleName).


Custom CMake Modules - Additional Modules for CMake.

This is the documentation for additional modules and scripts for CMake. Using these modules you can check the computer system for installed software packages, features of the compiler and the existence of headers to name just a few.

macro which checks if the source code compiles

CHECK_CXX_SOURCE_COMPILES(SOURCE VAR)


SOURCE - source code to try to compile
VAR - variable to store whether the source code compiled

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link

Check if the C++ source code provided in the SOURCE argument compiles and runs.

CHECK_CXX_SOURCE_RUNS(SOURCE VAR)


SOURCE - source code to try to compile
VAR - variable to store the result, 1 for success, empty for failure

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link

Check if the symbol exists in include files, in C++ mode

Forked off cmake's CheckSymbolExists.cmake CHECK_CXX_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)


SYMBOL - symbol
FILES - include files to check
VARIABLE - variable to return result

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link

Check if the given struct or class has the specified member variable

CHECK_POINTER_MEMBER (POINTER MEMBER HEADER VARIABLE)


POINTER - the name of the struct or class you are interested in
MEMBER - the member which existence you want to check
HEADER - the header(s) where the prototype should be declared
VARIABLE - variable to store the result

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories

Check if the prototype for a function exists.

CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)


FUNCTION - the name of the function you are looking for
HEADER - the header(s) where the prototype should be declared
VARIABLE - variable to store the result

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories

Check if the given struct or class has the specified member variable

CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)


STRUCT - the name of the struct or class you are interested in
MEMBER - the member which existence you want to check
HEADER - the header(s) where the prototype should be declared
VARIABLE - variable to store the result

The following variables may be set before calling this macro to modify the way the check is run:


CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories

Try to find the ACL library

Once done this will define


ACL_FOUND - system has the ACL library
ACL_LIBS - The libraries needed to use ACL

Try to find the AGG graphics library

Once done this will define


AGG_FOUND - system has AGG
AGG_INCLUDE_DIR - the AGG include directory
AGG_LIBRARIES - Link these to use AGG
AGG_DEFINITIONS - Compiler switches required for using AGG

Try to find the aKode library

Once done this will define


AKODE_FOUND - system has the aKode library
AKODE_INCLUDE_DIR - the aKode include directory
AKODE_LIBRARIES - The libraries needed to use aKode


Alsa check, based on libkmid/configure.in.in. Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it) It defines ... It offers the following macros:


ALSA_CONFIGURE_FILE(config_header) - generate a config.h, typical usage:
ALSA_CONFIGURE_FILE(${CMAKE_BINARY_DIR}/config-alsa.h)
ALSA_VERSION_STRING(version_string) looks for alsa/version.h and reads the version string into
the first argument passed to the macro

Try to find automoc4

Once done this will define


AUTOMOC4_FOUND - automoc4 has been found
AUTOMOC4_EXECUTABLE - the automoc4 tool
AUTOMOC4_VERSION - the full version of automoc4
AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION
broken into its components

It also adds the following macros


AUTOMOC4(<target> <SRCS_VAR>)
Use this to run automoc4 on all files contained in the list <SRCS_VAR>.


AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h ...)
Use this to add more header files to be processed with automoc4.


AUTOMOC4_ADD_EXECUTABLE(<target_NAME> src1 src2 ...)
This macro does the same as ADD_EXECUTABLE, but additionally
adds automoc4 handling for all source files.

AUTOMOC4_ADD_LIBRARY(<target_NAME> src1 src2 ...)


This macro does the same as ADD_LIBRARY, but additionally
adds automoc4 handling for all source files.


Find Avahi. Only avahi-common/defs.h is really needed

Try to find Berkeley DB

Once done this will define


BERKELEY_DB_FOUND - system has Berkeley DB
BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB

Try to find blitz lib

Once done this will define


BLITZ_FOUND - system has blitz lib
BLITZ_INCLUDES - the blitz include directory
BLITZ_LIBRARIES - The libraries needed to use blitz

Try to find BlueZ

Once done this will define


BLUEZ_FOUND - system has BlueZ
BLUEZ_INCLUDE_DIR - the BlueZ include directory
BLUEZ_LIBRARIES - Link these to use BlueZ
BLUEZ_DEFINITIONS - Compiler switches required for using BlueZ

Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.

Try to find Boost include dirs and libraries

Please see the Documentation for Boost in the CMake Manual for details This module only forwards to the one included in cmake for compatibility reasons.

Find Carbon on Mac


CARBON_LIBRARY - the library to use Carbon
CARBON_FOUND - true if Carbon has been found

Try to find DNSSD

Once done this will define


DNSSD_FOUND - system has DNSSD
DNSSD_INCLUDE_DIR - the DNSSD include directory
DNSSD_LIBRARIES - Link these to use dnssd
DNSSD_DEFINITIONS - Compiler switches required for using DNSSD

need more test: look at into dnssd/configure.in.in

Try to find the Enchant spell checker

Once done this will define


ENCHANT_FOUND - system has ENCHANT
ENCHANT_INCLUDE_DIR - the ENCHANT include directory
ENCHANT_LIBRARIES - Link these to use ENCHANT
ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT

Try to find Eigen1 library

Note that Eigen1 is deprecated in favor of Eigen2. So this file is deprecated in favor of FindEigen2.cmake. It is kept only for compatibility.

Once done this will define


EIGEN_FOUND - system has eigen lib
EIGEN_INCLUDE_DIR - the eigen include directory

Try to find Eigen2 lib

Once done this will define


EIGEN2_FOUND - system has eigen lib with correct version
EIGEN2_INCLUDE_DIR - the eigen include directory
EIGEN2_VERSION - eigen version

Try to find the Exiv2 library


EXIV2_MIN_VERSION - You can set this variable to the minimum version you need
before doing FIND_PACKAGE(Exiv2). The default is 0.12.

Once done this will define


EXIV2_FOUND - system has libexiv2
EXIV2_INCLUDE_DIR - the libexiv2 include directory
EXIV2_LIBRARIES - Link these to use libexiv2
EXIV2_DEFINITIONS - Compiler switches required for using libexiv2

Try to find the FAM directory notification library

Once done this will define


FAM_FOUND - system has FAM
FAM_INCLUDE_DIR - the FAM include directory
FAM_LIBRARIES - The libraries needed to use FAM

Try to find ffmpeg

Once done this will define


FFMPEG_FOUND - system has ffmpeg
FFMPEG_INCLUDE_DIR - Include directory necessary for using the ffmpeg headers
FFMPEG_LIBRARIES - Link these to use ffmpeg
FFMPEG_DEFINITIONS - Compiler switches required for using ffmpeg

Try to find Flac, the Free Lossless Audio Codec

Once done this will define


FLAC_FOUND - system has Flac
FLAC_INCLUDE_DIR - the Flac include directory
FLAC_LIBRARIES - Link these to use Flac
FLAC_OGGFLAC_LIBRARIES - Link these to use OggFlac

No version checking is done - use FLAC_API_VERSION_CURRENT to conditionally compile version-dependent code

Try to find Flex

Once done this will define


FLEX_FOUND - system has Flex
FLEX_EXECUTABLE - path of the flex executable
FLEX_VERSION - the version string, like "2.5.31"

Try to find the Fontconfig

Once done this will define


FONTCONFIG_FOUND - system has Fontconfig
FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG

Try to find the freetype library

Once done this will define


FREETYPE_FOUND - system has Freetype
FREETYPE_INCLUDE_DIRS - the FREETYPE include directories
FREETYPE_LIBRARIES - Link these to use FREETYPE
FREETYPE_INCLUDE_DIR - internal

Try to find GIF

Once done this will define


GIF_FOUND - system has GIF
GIF_INCLUDE_DIR - the GIF include directory
GIF_LIBRARIES - Libraries needed to use GIF
GIF_DEFINITIONS - Compiler switches required for using GIF

Try to find the GLIB2 libraries

Once done this will define


GLIB2_FOUND - system has glib2
GLIB2_INCLUDE_DIR - the glib2 include directory
GLIB2_LIBRARIES - glib2 library


Try to find the GMP librairies


GMP_FOUND - system has GMP lib
GMP_INCLUDE_DIR - the GMP include directory
GMP_LIBRARIES - Libraries needed to use GMP

Try to find GObject

Once done this will define


GOBJECT_FOUND - system has GObject
GOBJECT_INCLUDE_DIR - the GObject include directory
GOBJECT_LIBRARIES - the libraries needed to use GObject
GOBJECT_DEFINITIONS - Compiler switches required for using GObject

Try to detect the GSSAPI support

Once done this will define


GSSAPI_FOUND - system supports GSSAPI
GSSAPI_INCS - the GSSAPI include directory
GSSAPI_LIBS - the libraries needed to use GSSAPI
GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL

Try to find GStreamer

Once done this will define


GSTREAMER_FOUND - system has GStreamer
GSTREAMER_INCLUDE_DIR - the GStreamer include directory
GSTREAMER_LIBRARIES - the libraries needed to use GStreamer
GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer


Try to find Gettext functionality Once done this will define


GETTEXT_FOUND - system has Gettext
GETTEXT_INCLUDE_DIR - Gettext include directory
GETTEXT_LIBRARIES - Libraries needed to use Gettext


cmake macro to test if we use gphoto2


GPHOTO2_FOUND - system has the GPHOTO2 library
GPHOTO2_INCLUDE_DIR - the GPHOTO2 include directory
GPHOTO2_LIBRARIES - The libraries needed to use GPHOTO2

Find IOKit on Mac


IOKIT_LIBRARY - the library to use IOKit
IOKIT_FOUND - true if IOKit has been found

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()

The following variables are defined for the various tools required to compile KDE software:


KDE4_KCFGC_EXECUTABLE - the kconfig_compiler4 executable
KDE4_AUTOMOC_EXECUTABLE - the kde4automoc executable, deprecated, use AUTOMOC4_EXECUTABLE instead
KDE4_MEINPROC_EXECUTABLE - the meinproc4 executable
KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets4 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_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_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_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_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_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

This module defines a bunch of variables used as locations for install directories. 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 config file install dir
DATA_INSTALL_DIR - the parent directory where applications can install their data
HTML_INSTALL_DIR - the HTML install dir for documentation
ICON_INSTALL_DIR - the icon install dir (default prefix/share/icons/)
INFO_INSTALL_DIR - the kde info install dir (default prefix/info)
KCFG_INSTALL_DIR - the install dir for kconfig files
LOCALE_INSTALL_DIR - the install dir for translations
MAN_INSTALL_DIR - the kde man page install dir (default prefix/man/)
MIME_INSTALL_DIR - the install dir for the mimetype desktop files
PLUGIN_INSTALL_DIR - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4)
SERVICES_INSTALL_DIR - the install dir for service (desktop, protocol, ...) files
SERVICETYPES_INSTALL_DIR - the install dir for servicestypes desktop files
SOUND_INSTALL_DIR - the install dir for sound files
TEMPLATES_INSTALL_DIR - the install dir for templates (Create new file...)
WALLPAPER_INSTALL_DIR - the install dir for wallpapers
DEMO_INSTALL_DIR - the install dir for demos
KCONF_UPDATE_INSTALL_DIR - the kconf_update install dir
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 be installed (default is prefix/share/dbus-1/interfaces)
DBUS_SERVICES_INSTALL_DIR - the directory where dbus services be installed (default is prefix/share/dbus-1/services )

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

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] 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.


KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets)
Use this to add widget description files for the makekdewidgets4 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(), but additionally it supports KDE4_ENABLE_FINAL
and 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_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.


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
RelWithDebInfo (Release with debug info)
optimised for speed, 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


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.


Find if we installed kdebase/workspaces. Once done this will define


KDE4WORKSPACE_FOUND - system has KDE workspace installed
KDE4WORKSPACE_INCLUDE_DIR - the KDE workspace include directory

It also sets variables for the following libraries:


KDE4WORKSPACE_TASKMANAGER_LIBRARY, KDE4WORKSPACE_TASKMANAGER_LIBS
KDE4WORKSPACE_KWORKSPACE_LIBRARY, KDE4WORKSPACE_KWORKSPACE_LIBS
KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBRARY, KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBS
KDE4WORKSPACE_SOLIDCONTROL_LIBRARY, KDE4WORKSPACE_SOLIDCONTROL_LIBS
KDE4WORKSPACE_PROCESSUI_LIBRARY, KDE4WORKSPACE_PROCESSUI_LIBS
KDE4WORKSPACE_LSOFUI_LIBRARY, KDE4WORKSPACE_LSOFUI_LIBS
KDE4WORKSPACE_PLASMACLOCK_LIBRARY, KDE4WORKSPACE_PLASMACLOCK_LIBS
KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBS
KDE4WORKSPACE_NEPOMUKQUERY_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERY_LIBS
KDE4WORKSPACE_KSCREENSAVER_LIBRARY, KDE4WORKSPACE_KSCREENSAVER_LIBS
KDE4WORKSPACE_WEATHERION_LIBRARY, KDE4WORKSPACE_WEATHERION_LIBS
KDE4WORKSPACE_KWINEFFECTS_LIBRARY, KDE4WORKSPACE_KWINEFFECTS_LIBS
KDE4WORKSPACE_KDECORATIONS_LIBRARY, KDE4WORKSPACE_KDECORATIONS_LIBS
KDE4WORKSPACE_KSGRD_LIBRARY, KDE4WORKSPACE_KSGRD_LIBS
KDE4WORKSPACE_KEPHAL_LIBRARY, KDE4WORKSPACE_KEPHAL_LIBS

And the following locations:


KDE4WORKSPACE_LIB_DIR
KDE4WORKSPACE_LIBEXEC_DIR
KDE4WORKSPACE_INCLUDE_DIR
KDE4WORKSPACE_BIN_DIR
KDE4WORKSPACE_SBIN_DIR
KDE4WORKSPACE_DATA_DIR
KDE4WORKSPACE_HTML_DIR
KDE4WORKSPACE_CONFIG_DIR
KDE4WORKSPACE_ICON_DIR
KDE4WORKSPACE_KCFG_DIR
KDE4WORKSPACE_LOCALE_DIR
KDE4WORKSPACE_MIME_DIR
KDE4WORKSPACE_SOUND_DIR
KDE4WORKSPACE_TEMPLATES_DIR
KDE4WORKSPACE_WALLPAPER_DIR
KDE4WORKSPACE_KCONF_UPDATE_DIR
KDE4WORKSPACE_AUTOSTART_DIR
KDE4WORKSPACE_XDG_APPS_DIR
KDE4WORKSPACE_XDG_DIRECTORY_DIR
KDE4WORKSPACE_SYSCONF_DIR
KDE4WORKSPACE_MAN_DIR
KDE4WORKSPACE_INFO_DIR
KDE4WORKSPACE_DBUS_INTERFACES_DIR
KDE4WORKSPACE_DBUS_SERVICES_DIR
KDE4WORKSPACE_SERVICES_DIR
KDE4WORKSPACE_SERVICETYPES_DIR

Try to find the KDEWIN32 library - deprecated

Once done this will define


KDEWIN32_FOUND - system has KDEWIN32
KDEWIN32_INCLUDES - the KDEWIN32 include directories
KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32


KDEWIN packager http://www.winkde.org/pub/kde/ports/win32/installer

The kdewin packager is searched in the following pathes and order


path specified by the environment dir KDEWIN_PACKAGER_DIR
<ProgramFiles>/kdewin-packager
<ProgramFiles>/kdewin-installer

The macro KDEWIN_PACKAGER provides package building support and should be added to the top level CMakeLists.txt as shown below

if (KDEWIN_PACKAGER_FOUND)


KDEWIN_PACKAGER(
"projectname"
"version"
"description"
"additional options"
)

endif (KDEWIN_PACKAGER_FOUND)

Try to find the KDEWIN library

Once done this will define


KDEWIN_FOUND - system has KDEWIN
KDEWIN_INCLUDES - the KDEWIN include directories
KDEWIN_LIBRARIES - The libraries needed to use KDEWIN


Once done this will define


KNEPOMUK_FOUND - system has the Nepomuk-KDE backbone lib KNep
KNEPOMUK_INCLUDES - the libKNep include directory
KNEPOMUK_LIBRARIES - Link these to use libKNep

Try to find the Kdcraw library

Once done this will define


KDCRAW_FOUND - system has libkdcraw
KDCRAW_INCLUDE_DIR - the libkdcraw include directory
KDCRAW_LIBRARIES - Link these to use libkdcraw
KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw


Module to see if we have KDE4 kdemultimedia installed

This module defines


KDEMULTIMEDIA_INCLUDE_DIR - the include dir
KCDDB_LIBRARY - the kcddb library
KCOMPACTDISC_LIBRARY - the kcompactdisk library
KDEMULTIMEDIA_LIBRARIES - all of the KDE multimedia libraries together
KDEMULTIMEDIA_FOUND - true if the above have been found


Nothing should require kdepim. We'll show a fatal error and an explanation.


Find if we installed kdepimlibs before to compile it Once done this will define


KDEPIMLIBS_FOUND - system has KDE PIM Libraries
KDEPIMLIBS_INCLUDE_DIR - the KDE PIM Libraries include directory
KDEPIMLIBS_INCLUDE_DIRS - the KDE PIM Libraries include directory and CamelCase headers

It also sets variables for the following libraries:


KDEPIMLIBS_AKONADI_LIBS
KDEPIMLIBS_AKONADI_KMIME_LIBS
KDEPIMLIBS_AKONADI_KABC_LIBS
KDEPIMLIBS_GPGMEPP_LIBS
KDEPIMLIBS_KABC_LIBS
KDEPIMLIBS_KBLOG_LIBS
KDEPIMLIBS_KCAL_LIBS
KDEPIMLIBS_KHOLIDAYS_LIBS
KDEPIMLIBS_KIMAP_LIBS
KDEPIMLIBS_KLDAP_LIBS
KDEPIMLIBS_KMIME_LIBS
KDEPIMLIBS_KPIMIDENTITIES_LIBS
KDEPIMLIBS_KPIMUTILS_LIBS
KDEPIMLIBS_KRESOURCES_LIBS
KDEPIMLIBS_KTNEF_LIBS
KDEPIMLIBS_KXMLRPCCLIENT_LIBS
KDEPIMLIBS_MAILTRANSPORT_LIBS
KDEPIMLIBS_QGPGME_LIBS
KDEPIMLIBS_SYNDICATION_LIBS

And the following locations:


KDEPIMLIBS_DATA_DIR
KDEPIMLIBS_DBUS_INTERFACES_DIR
KDEPIMLIBS_DBUS_SERVICES_DIR
KDEPIMLIBS_INCLUDE_DIR
KDEPIMLIBS_INCLUDE_DIRS
KDEPIMLIBS_LIB_DIR
KDEPIMLIBS_BIN_DIR
KDEPIMLIBS_LIBEXEC_DIR
KDEPIMLIBS_SBIN_DIR
KDEPIMLIBS_HTML_DIR
KDEPIMLIBS_CONFIG_DIR
KDEPIMLIBS_ICON_DIR
KDEPIMLIBS_KCFG_DIR
KDEPIMLIBS_LOCALE_DIR
KDEPIMLIBS_MIME_DIR
KDEPIMLIBS_SOUND_DIR
KDEPIMLIBS_TEMPLATES_DIR
KDEPIMLIBS_KCONF_UPDATE_DIR
KDEPIMLIBS_AUTOSTART_DIR
KDEPIMLIBS_XDG_APPS_DIR
KDEPIMLIBS_XDG_DIRECTORY_DIR
KDEPIMLIBS_SYSCONF_DIR
KDEPIMLIBS_MAN_DIR
KDEPIMLIBS_INFO_DIR
KDEPIMLIBS_SERVICES_DIR
KDEPIMLIBS_SERVICETYPES_DIR

Try to find the KExiv2 library

Once done this will define


KEXIV2_FOUND - system has libkexiv2
KEXIV2_INCLUDE_DIR - the libkexiv2 include directory
KEXIV2_LIBRARIES - Link these to use libkexiv2
KEXIV2_DEFINITIONS - Compiler switches required for using libkexiv2

Try to find the Kipi library

Once done this will define


KIPI_FOUND - system has libkipi
KIPI_INCLUDE_DIR - the libkipi include directory
KIPI_LIBRARIES - Link these to use libkipi
KIPI_DEFINITIONS - Compiler switches required for using libkipi


Once done this will define


KONTO_FOUND - system has the Nepomuk-KDE backbone lib Konto
KONTO_INCLUDES - the libKonto include directory
KONTO_LIBRARIES - Link these to use libKonto

Try to find the Kopete library

Once done this will define


Kopete_FOUND - system has kopete
KOPETE_INCLUDE_DIR - the kopete include directory
KOPETE_LIBRARIES - Link these to use kopete

Find Korundum - the KDE Ruby bindings

This module finds if Korundum is installed. It defines the following variables:


KORUNDUM_PATH - the path to the korundum ruby file
KORUNDUM_FOUND - true if it has been found

Find LCMS

Find the LCMS includes and library This module defines


LCMS_INCLUDE_DIR, where to find lcms.h
LCMS_LIBRARIES, the libraries needed to use LCMS.
LCMS_VERSION, The value of LCMS_VERSION defined in lcms.h
LCMS_FOUND, If false, do not try to use LCMS.

Try to find the LibArt 2D graphics library

Once done this will define


LIBART_FOUND - system has the LibArt
LIBART_INCLUDE_DIR - the LibArt include directory
LIBART_LIBRARIES - The libraries needed to use LibArt

Try to find konqueror library

Once done this will define


LIBKONQ_FOUND - system has libkonq library
LIBKONQ_INCLUDE_DIR - the LIBKONQ include directory
LIBKONQ_LIBRARY - the libkonq library

Find LibLZMA

Find LibLZMA headers and library


LIBLZMA_FOUND - True if liblzma is found.
LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located.
LIBLZMA_LIBRARIES - Lzma libraries to link against.
LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required).
LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required).
LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required).

Try to find LibXml2

Once done this will define


LIBXML2_FOUND - System has LibXml2
LIBXML2_INCLUDE_DIR - The LibXml2 include directory
LIBXML2_LIBRARIES - The libraries needed to use LibXml2
LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2

Try to find LibXslt

Once done this will define


LIBXSLT_FOUND - system has LibXslt
LIBXSLT_INCLUDE_DIR - the LibXslt include directory
LIBXSLT_LIBRARIES - Link these to LibXslt
LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
LIBXSLT_XSLTPROC_EXECUTABLE - path to the xsltproc tool


Try to find Libintl functionality Once done this will define


LIBINTL_FOUND - system has Libintl
LIBINTL_INCLUDE_DIR - Libintl include directory
LIBINTL_LIBRARIES - Libraries needed to use Libintl

TODO: This will enable translations only if Gettext functionality is present in libc. Must have more robust system for release, where Gettext functionality can also reside in standalone Gettext library, or the one embedded within kdelibs (cf. gettext.m4 from Gettext source).



FIND_LIBRARY_WITH_DEBUG
-> enhanced FIND_LIBRARY to allow the search for an
optional debug library with a WIN32_DEBUG_POSTFIX similar
to CMAKE_DEBUG_POSTFIX when creating a shared lib
it has to be the second and third argument

Try to find wireless extensions support libraries

Once done this will define


IW_FOUND - system has IW
IW_INCLUDE_DIR - the IW include directory
IW_LIBRARIES - Link to these to use IW

Try to find msgfmt

Once done this will define


MSGFMT_FOUND - system has msgfmt


Module to find the musicbrainz library

It defines


MUSICBRAINZ_INCLUDE_DIR - the include dir
MUSICBRAINZ_LIBRARIES - the required libraries
MUSICBRAINZ_FOUND - true if both of the above have been found

Try to find MySQL / MySQL Embedded library

Find the MySQL includes and client library This module defines


MYSQL_INCLUDE_DIR, where to find mysql.h
MYSQL_LIBRARIES, the libraries needed to use MySQL.
MYSQL_LIB_DIR, path to the MYSQL_LIBRARIES
MYSQL_EMBEDDED_LIBRARIES, the libraries needed to use MySQL Embedded.
MYSQL_EMBEDDED_LIB_DIR, path to the MYSQL_EMBEDDED_LIBRARIES
MYSQL_FOUND, If false, do not try to use MySQL.
MYSQL_EMBEDDED_FOUND, If false, do not try to use MySQL Embedded.


Once done this will define

Nepomuk requires Soprano, so this module checks for Soprano too.


NEPOMUK_FOUND - system has Nepomuk
NEPOMUK_INCLUDE_DIR - the Nepomuk include directory
NEPOMUK_LIBRARIES - Link these to use Nepomuk
NEPOMUK_DEFINITIONS - Compiler switches required for using Nepomuk

Try to find NetworkManager

Once done this will define


NETWORKMANAGER_FOUND - system has NetworkManager
NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories
NETWORKMANAGER_LIBRARIES - the libraries needed to use NetworkManager
NETWORKMANAGER_CFLAGS - Compiler switches required for using NetworkManager
NETWORKMANAGER_VERSION - version number of NetworkManager

Try to find the OggVorbis libraries

Once done this will define


OGGVORBIS_FOUND - system has OggVorbis
OGGVORBIS_VERSION - set either to 1 or 2
OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
OGG_LIBRARY - The Ogg library
VORBIS_LIBRARY - The Vorbis library
VORBISFILE_LIBRARY - The VorbisFile library
VORBISENC_LIBRARY - The VorbisEnc library


Try to find the OpenEXR libraries This check defines:


OPENEXR_FOUND - system has OpenEXR
OPENEXR_INCLUDE_DIR - OpenEXR include directory
OPENEXR_LIBRARIES - Libraries needed to use OpenEXR
OPENEXR_DEFINITIONS - definitions required to use OpenEXR

Try to find the OpenSSL encryption library

Once done this will define


OPENSSL_FOUND - system has the OpenSSL library
OPENSSL_INCLUDE_DIR - the OpenSSL include directory
OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows

Try to find the PCRE regular expression library

Once done this will define


PCRE_FOUND - system has the PCRE library
PCRE_INCLUDE_DIR - the PCRE include directory
PCRE_LIBRARIES - The libraries needed to use PCRE


Find libphonon Once done this will define


PHONON_FOUND - system has Phonon Library
PHONON_INCLUDES - the Phonon include directory
PHONON_LIBS - link these to use Phonon
PHONON_VERSION - the version of the Phonon Library

a pkg-config module for CMake

Usage:


pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
checks for all the given modules


pkg_search_module(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
checks for given modules and uses the first working one

When the 'REQUIRED' argument was set, macros will fail with an error when module(s) could not be found

When the 'QUIET' argument is set, no error message will be output if the package was not found.

It sets the following variables:


PKG_CONFIG_FOUND ... true if pkg-config works on the system
PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
<PREFIX>_FOUND ... set to 1 if module(s) exist

For the following variables two sets of values exist; first one is the common one and has the given PREFIX. The second set contains flags which are given out when pkgconfig was called with the '--static' option.


<XPREFIX>_LIBRARIES ... only the libraries (w/o the '-l')
<XPREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L')
<XPREFIX>_LDFLAGS ... all required linker flags
<XPREFIX>_LDFLAGS_OTHER ... all other linker flags
<XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I')
<XPREFIX>_CFLAGS ... all required cflags
<XPREFIX>_CFLAGS_OTHER ... the other compiler flags


<XPREFIX> = <PREFIX> for common case
<XPREFIX> = <PREFIX>_STATIC for static linking

There are some special variables whose prefix depends on the count of given modules. When there is only one module, <PREFIX> stays unchanged. When there are multiple modules, the prefix will be changed to <PREFIX>_<MODNAME>:


<XPREFIX>_VERSION ... version of the module
<XPREFIX>_PREFIX ... prefix-directory of the module
<XPREFIX>_INCLUDEDIR ... include-dir of the module
<XPREFIX>_LIBDIR ... lib-dir of the module


<XPREFIX> = <PREFIX> when |MODULES| == 1, else
<XPREFIX> = <PREFIX>_<MODNAME>

A <MODULE> parameter can have the following formats:


{MODNAME} ... matches any version
{MODNAME}>={VERSION} ... at least version <VERSION> is required
{MODNAME}={VERSION} ... exactly version <VERSION> is required
{MODNAME}<={VERSION} ... modules must not be newer than <VERSION>

Examples


pkg_check_modules (GLIB2 glib-2.0)


pkg_check_modules (GLIB2 glib-2.0>=2.10)
requires at least version 2.10 of glib2 and defines e.g.
GLIB2_VERSION=2.10.3


pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0)
requires both glib2 and gtk2, and defines e.g.
FOO_glib-2.0_VERSION=2.10.3
FOO_gtk+-2.0_VERSION=2.8.20


pkg_check_modules (XRENDER REQUIRED xrender)
defines e.g.:
XRENDER_LIBRARIES=Xrender;X11
XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp


pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2)

Try to find the Qt4 binding of the Poppler library

Once done this will define


POPPLER_QT4_FOUND - system has poppler-qt4
POPPLER_QT4_INCLUDE_DIR - the poppler-qt4 include directory
POPPLER_QT4_LIBRARIES - Link these to use poppler-qt4
POPPLER_QT4_DEFINITIONS - Compiler switches required for using poppler-qt4

Find PostgreSQL

Find the PostgreSQL includes and client library This module defines


POSTGRESQL_INCLUDE_DIR, where to find POSTGRESQL.h
POSTGRESQL_LIBRARIES, the libraries needed to use POSTGRESQL.
POSTGRESQL_FOUND, If false, do not try to use PostgreSQL.


Try to find the PulseAudio library

Once done this will define:


PULSEAUDIO_FOUND - system has the PulseAudio library
PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory
PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio
PULSEAUDIO_MAINLOOP_LIBRARY - the libraries needed to use PulsAudio Mailoop

Copyright (c) 2008, Matthias Kretz, <kretz@kde.org> Copyright (c) 2009, Marcus Hufgard, <Marcus.Hufgard@hufgard.de>

Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.


FindPyKDE4

Checks that Python and PyKDE4 are installed and defines a couple macros:


* PYKDE4_INSTALL_PYTHON_FILES
* PYKDE4_ADD_UI_FILES
* PYKDE4_ADD_EXECUTABLE


Find PyQt4 ~~~~~~~~~~ Copyright (c) 2007-2008, Simon Edwards <simon@simonzone.com> Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.

PyQt4 website: http://www.riverbankcomputing.co.uk/pyqt/index.php

Find the installed version of PyQt4. FindPyQt4 should only be called after Python has been found.

This file defines the following variables:

PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number


suitable for comparision as a string

PYQT4_VERSION_STR - The version of PyQt4 as a human readable string.

PYQT4_VERSION_TAG - The PyQt version tag using by PyQt's sip files.

PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files.

PYQT4_SIP_FLAGS - The SIP flags used to build PyQt.


Find Python ~~~~~~~~~~~ Find the Python interpreter and related Python directories.

This file defines the following variables:

PYTHON_EXECUTABLE - The path and filename of the Python interpreter.

PYTHON_SHORT_VERSION - The version of the Python interpreter found,


excluding the patch version number. (e.g. 2.5 and not 2.5.1))

PYTHON_LONG_VERSION - The version of the Python interpreter found as a human


readable string.

PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory.

PYTHON_INCLUDE_PATH - Directory holding the python.h include file.

PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library.

Try to find QCA2 (Qt Cryptography Architecture 2)

Once done this will define


QCA2_FOUND - system has QCA2
QCA2_INCLUDE_DIR - the QCA2 include directory
QCA2_LIBRARIES - the libraries needed to use QCA2
QCA2_DEFINITIONS - Compiler switches required for using QCA2

use pkg-config to get the directories and then use these values in the FIND_PATH() and FIND_LIBRARY() calls

Try to find the qimageblitz lib

Once done this will define


QIMAGEBLITZ_FOUND - system has qimageblitz lib
QIMAGEBLITZ_INCLUDES - the qimageblitz include directory
QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz

Find QT 4

This module can be used to find Qt4. The most important issue is that the Qt4 qmake is available via the system path. This qmake is then used to detect basically everything else. This module defines a number of key variables and macros. First is QT_USE_FILE which is the path to a CMake file that can be included to compile Qt 4 applications and libraries. By default, the QtCore and QtGui libraries are loaded. This behavior can be changed by setting one or more of the following variables to true before doing INCLUDE(${QT_USE_FILE}):


QT_DONT_USE_QTCORE
QT_DONT_USE_QTGUI
QT_USE_QT3SUPPORT
QT_USE_QTASSISTANT
QT_USE_QTDESIGNER
QT_USE_QTMOTIF
QT_USE_QTMAIN
QT_USE_QTNETWORK
QT_USE_QTNSPLUGIN
QT_USE_QTOPENGL
QT_USE_QTSQL
QT_USE_QTXML
QT_USE_QTSVG
QT_USE_QTTEST
QT_USE_QTUITOOLS
QT_USE_QTDBUS
QT_USE_QTSCRIPT
QT_USE_QTASSISTANTCLIENT
QT_USE_QTHELP
QT_USE_QTWEBKIT
QT_USE_QTXMLPATTERNS
QT_USE_PHONON

The file pointed to by QT_USE_FILE will set up your compile environment by adding include directories, preprocessor defines, and populate a QT_LIBRARIES variable containing all the Qt libraries and their dependencies. Add the QT_LIBRARIES variable to your TARGET_LINK_LIBRARIES.

Typical usage could be something like:


FIND_PACKAGE(Qt4)
SET(QT_USE_QTXML 1)
INCLUDE(${QT_USE_FILE})
ADD_EXECUTABLE(myexe main.cpp)
TARGET_LINK_LIBRARIES(myexe ${QT_LIBRARIES})

There are also some files that need processing by some Qt tools such as moc and uic. Listed below are macros that may be used to process those files.



macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
create moc code from a list of files containing Qt class with
the Q_OBJECT declaration. Options may be given to moc, such as those found
when executing "moc -help"


macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
create code from a list of Qt designer ui files.
Options may be given to uic, such as those found
when executing "uic -help"


macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
create code from a list of Qt resource files.
Options may be given to rcc, such as those found
when executing "rcc -help"


macro QT4_GENERATE_MOC(inputfile outputfile )
creates a rule to run moc on infile and create outfile.
Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
because you need a custom filename for the moc file or something similar.


macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
This macro is still experimental.
It can be used to have moc automatically handled.
So if you have the files foo.h and foo.cpp, and in foo.h a
a class uses the Q_OBJECT macro, moc has to run on it. If you don't
want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
#include "foo.moc"
in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
scan all listed files at cmake-time for such included moc files and if it finds
them cause a rule to be generated to run moc at build time on the
accompanying header file foo.h.
If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.


macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
create a the interface header and implementation files with the
given basename from the given interface xml file and add it to
the list of sources.
To disable generating a namespace header, set the source file property
NO_NAMESPACE to TRUE on the interface file.
To include a header in the interface header, set the source file property
INCLUDE to the name of the header.
To specify a class name to use, set the source file property CLASSNAME
to the name of the class.


macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
create the interface header and implementation files
for all listed interface xml files
the name will be automatically determined from the name of the xml file
To disable generating namespace headers, set the source file property
NO_NAMESPACE to TRUE for these inputfiles.
To include a header in the interface header, set the source file property
INCLUDE to the name of the header.
To specify a class name to use, set the source file property CLASSNAME
to the name of the class.


macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
create a dbus adaptor (header and implementation file) from the xml file
describing the interface, and add it to the list of sources. The adaptor
forwards the calls to a parent class, defined in parentheader and named
parentclassname. The name of the generated files will be
<basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
If <classname> is provided, then it will be used as the classname of the
adaptor itself.


macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
generate the xml interface file from the given header.
If the optional argument interfacename is omitted, the name of the
interface file is constructed from the basename of the header with
the suffix .xml appended.
Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"


QT_FOUND If false, don't try to use Qt.
QT4_FOUND If false, don't try to use Qt 4.


QT_VERSION_MAJOR The major version of Qt found.
QT_VERSION_MINOR The minor version of Qt found.
QT_VERSION_PATCH The patch version of Qt found.


QT_QTCORE_FOUND True if QtCore was found.
QT_QTGUI_FOUND True if QtGui was found.
QT_QT3SUPPORT_FOUND True if Qt3Support was found.
QT_QTASSISTANT_FOUND True if QtAssistant was found.
QT_QTDBUS_FOUND True if QtDBus was found.
QT_QTDESIGNER_FOUND True if QtDesigner was found.
QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
QT_QTMOTIF_FOUND True if QtMotif was found.
QT_QTNETWORK_FOUND True if QtNetwork was found.
QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found.
QT_QTOPENGL_FOUND True if QtOpenGL was found.
QT_QTSQL_FOUND True if QtSql was found.
QT_QTXML_FOUND True if QtXml was found.
QT_QTSVG_FOUND True if QtSvg was found.
QT_QTSCRIPT_FOUND True if QtScript was found.
QT_QTTEST_FOUND True if QtTest was found.
QT_QTUITOOLS_FOUND True if QtUiTools was found.
QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found.
QT_QTHELP_FOUND True if QtHelp was found.
QT_QTWEBKIT_FOUND True if QtWebKit was found.
QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found.
QT_PHONON_FOUND True if phonon was found.


QT_DEFINITIONS Definitions to use when compiling code that uses Qt.
You do not need to use this if you include QT_USE_FILE.
The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
to fit your current build type. Those are not contained
in QT_DEFINITIONS.

QT_INCLUDES List of paths to all include directories of
Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
always in this variable even if NOTFOUND,
all other INCLUDE_DIRS are
only added if they are found.
You do not need to use this if you include QT_USE_FILE.


Include directories for the Qt modules are listed here.
You do not need to use these variables if you include QT_USE_FILE.


QT_INCLUDE_DIR Path to "include" of Qt4
QT_QT_INCLUDE_DIR Path to "include/Qt"
QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
QT_QTCORE_INCLUDE_DIR Path to "include/QtCore"
QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
QT_QTGUI_INCLUDE_DIR Path to "include/QtGui"
QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif"
QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork"
QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin"
QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL"
QT_QTSQL_INCLUDE_DIR Path to "include/QtSql"
QT_QTXML_INCLUDE_DIR Path to "include/QtXml"
QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg"
QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript"
QT_QTTEST_INCLUDE_DIR Path to "include/QtTest"
QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant"
QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp"
QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit"
QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns"
QT_PHONON_INCLUDE_DIR Path to "include/phonon"

QT_LIBRARY_DIR Path to "lib" of Qt4


QT_PLUGINS_DIR Path to "plugins" for Qt4

For every library of Qt, a QT_QTFOO_LIBRARY variable is defined, with the full path to the library.

So there are the following variables: The Qt3Support library: QT_QT3SUPPORT_LIBRARY

The QtAssistant library: QT_QTASSISTANT_LIBRARY

The QtCore library: QT_QTCORE_LIBRARY

The QtDBus library: QT_QTDBUS_LIBRARY

The QtDesigner library: QT_QTDESIGNER_LIBRARY

The QtDesignerComponents library: QT_QTDESIGNERCOMPONENTS_LIBRARY

The QtGui library: QT_QTGUI_LIBRARY

The QtMotif library: QT_QTMOTIF_LIBRARY

The QtNetwork library: QT_QTNETWORK_LIBRARY

The QtNsPLugin library: QT_QTNSPLUGIN_LIBRARY

The QtOpenGL library: QT_QTOPENGL_LIBRARY

The QtSql library: QT_QTSQL_LIBRARY

The QtXml library: QT_QTXML_LIBRARY

The QtSvg library: QT_QTSVG_LIBRARY

The QtScript library: QT_QTSCRIPT_LIBRARY

The QtTest library: QT_QTTEST_LIBRARY

The qtmain library for Windows QT_QTMAIN_LIBRARY

The QtUiTools library: QT_QTUITOOLS_LIBRARY

The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY

The QtHelp library: QT_QTHELP_LIBRARY

The QtWebKit library: QT_QTWEBKIT_LIBRARY

The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY

The Phonon library: QT_PHONON_LIBRARY


also defined, but NOT for general use are


QT_MOC_EXECUTABLE Where to find the moc tool.
QT_UIC_EXECUTABLE Where to find the uic tool.
QT_UIC3_EXECUTABLE Where to find the uic3 tool.
QT_RCC_EXECUTABLE Where to find the rcc tool
QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool.
QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool.
QT_LUPDATE_EXECUTABLE Where to find the lupdate tool.
QT_LRELEASE_EXECUTABLE Where to find the lrelease tool.

QT_DOC_DIR Path to "doc" of Qt4
QT_MKSPECS_DIR Path to "mkspecs" of Qt4

These are around for backwards compatibility they will be set


QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found
QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found

These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)


QT_MT_REQUIRED Qt4 is now always multithreaded

These variables are set to "" Because Qt structure changed (They make no sense in Qt4)


QT_QT_LIBRARY Qt-Library is now split

Find Ruby

This module finds if Ruby is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:


RUBY_LIBRARY = full path+file to the ruby library
RUBY_INCLUDE_PATH = path to where ruby.h can be found
RUBY_EXECUTABLE = full path+file to the ruby binary
RUBY_FOUND = Ruby was found under system.


Find SIP ~~~~~~~~

SIP website: http://www.riverbankcomputing.co.uk/sip/index.php

Find the installed version of SIP. FindSIP should be called after Python has been found.

This file defines the following variables:

SIP_VERSION - The version of SIP found expressed as a 6 digit hex number


suitable for comparision as a string.

SIP_VERSION_STR - The version of SIP found as a human readable string.

SIP_EXECUTABLE - Path and filename of the SIP command line executable.

SIP_INCLUDE_DIR - Directory holding the SIP C++ header file.

SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed


into.

Try to find the samba directory library

Once done this will define


SAMBA_FOUND - system has SAMBA
SAMBA_INCLUDE_DIR - the SAMBA include directory
SAMBA_LIBRARIES - The libraries needed to use SAMBA
Set SAMBA_REQUIRE_SMBC_SET_CONTEXT to TRUE if you need a version of Samba
which comes with smbc_set_context()


cmake macro to test if we use sane


SANE_FOUND - system has SANE libs
SANE_INCLUDE_DIR - the SANE include directory
SANE_LIBRARIES - The libraries needed to use SANE

Try to find the sasl2 directory library

Once done this will define


SASL2_FOUND - system has SASL2
SASL2_INCLUDE_DIR - the SASL2 include directory
SASL2_LIBRARIES - The libraries needed to use SASL2

Try to find the shared-mime-info package


SHARED_MIME_INFO_MINIMUM_VERSION - Set this to the minimum version you need, default is 0.18

Once done this will define


SHARED_MIME_INFO_FOUND - system has the shared-mime-info package
UPDATE_MIME_DATABASE_EXECUTABLE - the update-mime-database executable


Find an installation of Soprano

Sets the following variables:


Soprano_FOUND - true is Soprano has been found
SOPRANO_INCLUDE_DIR - The include directory
SOPRANO_LIBRARIES - The Soprano core library to link to (libsoprano)
SOPRANO_INDEX_LIBRARIES - The Soprano index library (libsopranoindex)
SOPRANO_CLIENT_LIBRARIES - The Soprano client library (libsopranoclient)
SOPRANO_SERVER_LIBRARIES - The Soprano server library (libsopranoserver)
SOPRANO_VERSION - The Soprano version (string value)

SOPRANO_PLUGIN_NQUADPARSER_FOUND - true if the nquadparser plugin is found SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND - true if the nquadserializer plugin is found SOPRANO_PLUGIN_RAPTORPARSER_FOUND - true if the raptorparser plugin is found SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND - true if the raptorserializer plugin is found SOPRANO_PLUGIN_REDLANDBACKEND_FOUND - true if the redlandbackend plugin is found SOPRANO_PLUGIN_SESAME2BACKEND_FOUND - true if the sesame2backend plugin is found SOPRANO_PLUGIN_VIRTUOSOBACKEND_FOUND - true if the virtuosobackend plugin is found

Options:


Set SOPRANO_MIN_VERSION to set the minimum required Soprano version (default: 1.99)

Try to find Sqlite

Once done this will define


SQLITE_FOUND - system has Sqlite
SQLITE_INCLUDE_DIR - the Sqlite include directory
SQLITE_LIBRARIES - Link these to use Sqlite
SQLITE_DEFINITIONS - Compiler switches required for using Sqlite

Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.

Try to find Strigi, a fast and small desktop search program (http://strigi.sourceforge.net )

Once done this will define


STRIGI_FOUND - system has Strigi
STRIGI_INCLUDE_DIR - the Strigi include directory
STRIGI_STREAMANALYZER_LIBRARY - Link these to use Strigi streamanalyzer
STRIGI_STREAMS_LIBRARY - Link these to use Strigi streams
STRIGI_LINE_ANALYZER_PREFIX - strigi plugin prefix
STRIGI_THROUGH_ANALYZER_PREFIX - strigi plugin prefix

Try to find the Taglib library

Once done this will define


TAGLIB_FOUND - system has the taglib library
TAGLIB_CFLAGS - the taglib cflags
TAGLIB_LIBRARIES - The libraries needed to use taglib

Try to find the freetype library

Once done this defines


LIBUSB_FOUND - system has libusb
LIBUSB_INCLUDE_DIR - the libusb include directory
LIBUSB_LIBRARIES - Link these to use libusb

Find X11 installation

Try to find X11 on UNIX systems. The following values are defined


X11_FOUND - True if X11 is available
X11_INCLUDE_DIR - include directories to use X11
X11_LIBRARIES - link against these to use X11

and also the following more fine grained variables:


X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND
X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND
X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND
X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND
X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND
X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND
X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND
X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND
X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND
X11_Xext_LIB, X11_Xext_FOUND
X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND
X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND
X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND
X11_xf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_xf86misc_FOUND
X11_xf86vmode_INCLUDE_PATH, X11_xf86vmode_FOUND
X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND
X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND
X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND
X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND
X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND
X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND
X11_Xkbfile_INCLUDE_PATH, X11_Xkbfile_LIB, X11_Xkbfile_FOUND
X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND
X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND
X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND
X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND
X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND
X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND
X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND
X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND
X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND

Try to find the XINE library

Once done this will define


XINE_FOUND - system has the XINE library
XINE_VERSION - XINE version
XINE_BUGFIX_VERSION - the XINE bugfix version
XINE_INCLUDE_DIR - the XINE include directory
XINE_LIBRARY - The libraries needed to use XINE
XINE_XCB_FOUND - libxine can use XCB for video output


Search xmms Once done this will define


XMMS_FOUND - system has xmms
XMMS_INCLUDE_DIRS - the xmms include directory
XMMS_LIBRARIES - Link these to use xmms
XMMS_LDFLAGS - for compatibility only, same as XMMS_LIBRARIES


for documentation look at FindKDE4Internal.cmake

MACRO_ADD_COMPILE_FLAGS(<_target> "flags...")


MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...)

MACRO_ADD_LINK_FLAGS(<_target> "flags...")

MACRO_ADDITIONAL_CLEAN_FILES(files...)

MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )


MACRO_APPEND_IF(CONDITION VAR VALUE1...VALUEN ) This convenience macro appends the values VALUE1 up to VALUEN to the list given in VAR, but only if the variable CONDITION is TRUE:

usage example: IF(SOMELIB_FOUND)


SET(my_sources ${my_sources} somefile.c someotherfile.c)

ENDIF(SOMELIB_FOUND)

becomes: MACRO_APPEND_IF(SOMELIB_FOUND my_sources somefile.c someotherfile.c)


MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN ) This macro evaluates its first argument and sets all the given vaiables either to 0 or 1 depending on the value of the first one

MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)

MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)


Call this macro in your project if you want to enforce out-of-source builds.
If an in-source build is detected, it will abort with the given error message.
This macro works in any of the CMakeLists.txt of your project, but the recommended
location to call this is close to the beginning of the top level CMakeLists.txt


This file defines the following macros for developers to use in ensuring that installed software is of the right version:

MACRO_ENSURE_VERSION - test that a version number is greater than


or equal to some minimum

MACRO_ENSURE_VERSION_RANGE - test that a version number is greater than


or equal to some minimum and less than some
maximum

MACRO_ENSURE_VERSION2 - deprecated, do not use in new code

include MacroLibrary offers a collection of macros which extend the built-in cmake commands


This file defines the Feature Logging macros.

MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])


Logs the information so that it can be displayed at the end
of the configure run
VAR : TRUE or FALSE, indicating whether the feature is supported
FEATURE: name of the feature, e.g. "libjpeg"
DESCRIPTION: description what this feature provides
URL: home page
REQUIRED: TRUE or FALSE, indicating whether the featue is required
MIN_VERSION: minimum version number. empty string if unneeded
COMMENTS: More info you may want to provide. empty string if unnecessary

MACRO_DISPLAY_FEATURE_LOG()


Call this to display the collected results.
Exits CMake with a FATAL error message if a required feature is missing

Example:

INCLUDE(MacroLogFeature)

FIND_PACKAGE(JPEG) MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "") ... MACRO_DISPLAY_FEATURE_LOG()

MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines ADD_SUBDIRECTORY() with an OPTION()

MACRO_OPTIONAL_ADD_SUBDIRECTORY( <dir> ) If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of ADD_SUBDIRECTORY(), this will have two effects 1 - CMake will not complain if the directory doesn't exist


This makes sense if you want to distribute just one of the subdirs
in a source package, e.g. just one of the subdirs in kdeextragear.

2 - If the directory exists, it will offer an option to skip the


subdirectory.
This is useful if you want to compile only a subset of all
directories.

If the CMake variable DISABLE_ALL_OPTIONAL_SUBDIRECTORIES is set to TRUE for the first CMake run on the project, all optional subdirectories will be disabled by default (but can of course be enabled via the respective options). E.g. the following will disable all optional subdirectories except the one named "kcalc":


$ cmake -DDISABLE_ALL_OPTIONAL_SUBDIRECTORIES=TRUE -DBUILD_kcalc=TRUE <srcdir>


Search if cmake module is installed in computer cmake will not fail but signal that we must install depend package before. add as previously name of cmake module "_name" and define package needed "_module_needed" if return DEPEND_PACKAGE_${_name}

MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()

MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] ) This macro is a combination of OPTION() and FIND_PACKAGE(), it works like FIND_PACKAGE(), but additionally it automatically creates an option name WITH_<name>, which can be disabled via the cmake GUI. or via -DWITH_<name>=OFF The standard <name>_FOUND variables can be used in the same way as when using the normal FIND_PACKAGE()


this module defines two macros: MACRO_PUSH_REQUIRED_VARS() and MACRO_POP_REQUIRED_VARS() use these if you call cmake macros which use any of the CMAKE_REQUIRED_XXX variables

Usage: MACRO_PUSH_REQUIRED_VARS() SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF) CHECK_FUNCTION_EXISTS(...) MACRO_POP_REQUIRED_VARS()



MACRO_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch)
Writes a file for use as <package>ConfigVersion.cmake file to <_filename>.
See the documentation of FIND_PACKAGE() for details on this.
_filename is the output filename, it should be in the build tree.
_major is the major version number of the project to be installed
_minor is the minor version number of the project to be installed
_patch is the patch version number of the project to be installed


This file contains the following macros:

NEPOMUK_GENERATE_FROM_ONTOLOGY Parameters:


ontofile - Path to the NRL ontology defining the resources to be generated.
targetdir - Folder to which the generated sources should be written.
out_headers - Variable which will be filled with the names of all generated headers.
out_sources - Variable which will be filled with the names of all generated sources.
out_includes - Variable which will be filled with complete include statements of all
generated resource classes.

In addition to the parameters an arbitrary number of template filenames can be set as arguments

In case of success NEPOMUK_RESOURCES_GENERATED is true, otherwise false


Python macros ~~~~~~~~~~~~~ Copyright (c) 2007, Simon Edwards <simon@simonzone.com>

Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.

This file defines the following macros:

PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)


Install the SOURCE_FILE, which is a Python .py file, into the
destination directory during install. The file will be byte compiled
and both the .py file and .pyc file will be installed.


Macros for SIP ~~~~~~~~~~~~~~ Copyright (c) 2007, Simon Edwards <simon@simonzone.com> Redistribution and use is allowed according to the terms of the BSD license. For details see the accompanying COPYING-CMAKE-SCRIPTS file.

SIP website: http://www.riverbankcomputing.co.uk/sip/index.php

This file defines the following macros:

ADD_SIP_PYTHON_MODULE (MODULE_NAME MODULE_SIP [library1, libaray2, ...])


Specifies a SIP file to be built into a Python module and installed.
MODULE_NAME is the name of Python module including any path name. (e.g.
os.sys, Foo.bar etc). MODULE_SIP the path and filename of the .sip file
to process and compile. libraryN are libraries that the Python module,
which is typically a shared library, should be linked to. The built
module will also be install into Python's site-packages directory.

The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a number of variables:

SIP_INCLUDES - List of directories which SIP will scan through when looking


for included .sip files. (Corresponds to the -I option for SIP.)

SIP_TAGS - List of tags to define when running SIP. (Corresponds to the -t


option for SIP.)

SIP_CONCAT_PARTS - An integer which defines the number of parts the C++ code


of each module should be split into. Defaults to 8. (Corresponds to the
-j option for SIP.)

SIP_DISABLE_FEATURES - List of feature names which should be disabled


running SIP. (Corresponds to the -x option for SIP.)

SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to


SIP.


win32 macros

ADDEXPLORERWRAPPER(project)

Exists only under Win32 !

addExplorerWrapper creates batch files for fast access to the build environment from the win32 explorer.

For mingw and nmake projects it opens a command shell, for Visual Studio IDE's (at least tested with VS 8 2005) it opens the related .sln file with paths setting specified at configure time.


Create an executable symlink to a Python script. This also sets the target script's permission bits.

SEE ALSO

ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmakemodules(1), cmakeprops(1), cmakevars(1)

The following resources are available to get help using CMake:

http://www.cmake.org

The primary starting point for learning about CMake.

http://www.cmake.org/Wiki/CMake_FAQ

A Wiki is provided containing answers to frequently asked questions.

http://www.cmake.org/HTML/Documentation.html

Links to available documentation may be found on this web page.

http://www.cmake.org/HTML/MailingLists.html

For help and discussion about using cmake, a mailing list is provided at cmake@cmake.org. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at http://www.cmake.org before posting questions to the list.

May 10, 2016 cmake 2.8.12.2