aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDE4Internal.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindKDE4Internal.cmake')
-rw-r--r--modules/FindKDE4Internal.cmake272
1 files changed, 142 insertions, 130 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index a0c2a0fd..3a84c9b2 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -2,141 +2,141 @@
#
# This module defines the following variables:
#
-# KDE4_FOUND - set to TRUE if everything required for building KDE software has been found
+# 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()
+# 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_compiler executable
-# KDE4_AUTOMOC_EXECUTABLE - the kde4automoc executable
-# KDE4_MEINPROC_EXECUTABLE - the meinproc4 executable
-# KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets executable
+# KDE4_KCFGC_EXECUTABLE - the kconfig_compiler executable
+# KDE4_AUTOMOC_EXECUTABLE - the kde4automoc executable
+# 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_KDE3SUPPORT_LIBRARY - the kde3support library
-# KDE4_KFILE_LIBRARY - the kfile library
-# KDE4_KHTML_LIBRARY - the khtml library
-# KDE4_KJS_LIBRARY - the kjs library
-# KDE4_KNEWSTUFF2_LIBRARY - the knewstuff2 library
-# KDE4_KDNSSD_LIBRARY - the kdnssd library
-# KDE4_PHONON_LIBRARY - the phonon library
-# KDE4_KAUDIODEVICELIST_LIBRARY - the kaudiodevicelist 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_KNEPOMUK_LIBRARY - the knepomuk library
-# KDE4_KMETADATA_LIBRARY - the kmetadata library
+# 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_KNEWSTUFF2_LIBRARY - the knewstuff2 library
+# KDE4_KDNSSD_LIBRARY - the kdnssd library
+# KDE4_PHONON_LIBRARY - the phonon library
+# KDE4_KAUDIODEVICELIST_LIBRARY - the kaudiodevicelist 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_KNEPOMUK_LIBRARY - the knepomuk library
+# KDE4_KMETADATA_LIBRARY - the kmetadata library
#
# 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_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_KNEPOMUK_LIBS - the knepomuk library and all depending libraries
-# KDE4_KMETADATA_LIBS - the kmetadata library and all depending libraries
+# 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_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_KNEPOMUK_LIBS - the knepomuk library and all depending libraries
+# KDE4_KMETADATA_LIBS - the kmetadata library and all depending libraries
#
-# This module defines a bunch of variables used as locations
-# for install directories. They are all interpreted relative
-# to CMAKE_INSTALL_PREFIX
+# 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 be installed (default is prefix/bin)
-# 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
-# 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 )
+# BIN_INSTALL_DIR - the directory where executables be installed (default is prefix/bin)
+# 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
+# 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 ?")
+# 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_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
#
# It also adds the following macros (from KDE4Macros.cmake)
-# KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui)
+# 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)
+# 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)
+# 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)
+# 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)
+# 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 )
+# 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.
# It creates and installs an appropriate libtool la-file.
#
-# KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
+# 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
@@ -146,7 +146,7 @@
# application bundles are created, with the NOGUI option no bundles but simple executables
# are created. Currently it doesn't have any effect on other platforms.
#
-# KDE4_ADD_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
+# KDE4_ADD_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
# Equivalent to ADD_EXECUTABLE(), but additionally adds some more features:
# -support for KDE4_ENABLE_FINAL
# -support for automoc
@@ -157,11 +157,11 @@
# application bundles are created, with the NOGUI option no bundles but simple executables
# are created. Currently it doesn't have any effect on other platforms.
#
-# KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN)
+# 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)
+# 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"
@@ -170,7 +170,7 @@
# The name of the target can be specified using TESTNAME <targetname>, if it is not given
# the macro will default to the <testname>
#
-# KDE4_ADD_TEST_EXECUTABLE (name file1 ... fileN)
+# KDE4_ADD_TEST_EXECUTABLE (name file1 ... fileN)
# add an test executable
# it will be built with RPATH poiting to the build dir
# The targets are always created, but only built for the "all"
@@ -180,36 +180,38 @@
# KGlobal::dirs()->addResourceDir( "data", KDESRCDIR ); to be able to use xmlgui
# and other things in the test, that normally require installation
#
-# KDE4_UPDATE_ICONCACHE()
+# 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)
+# 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])
+# 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 )
+# 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_PLATFORM_INCLUDE_DIRS is used only internally
-# _KDE4_PLATFORM_DEFINITIONS is used only internally
-#
-#
-# Copyright (c) 2006, Alexander Neundorf <neundorf@kde.org>
+
+
+# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally
+# _KDE4_PLATFORM_DEFINITIONS is used only internally
+
+# Copyright (c) 2006-2008, 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.
+
+
if(KDE4_FOUND)
# Already found in this cmake run, nothing more to do
else(KDE4_FOUND)
@@ -218,14 +220,10 @@ include (MacroEnsureVersion)
cmake_minimum_required(VERSION 2.4.5 FATAL_ERROR)
-set(QT_MIN_VERSION "4.3.0")
+set(QT_MIN_VERSION "4.4.0")
#this line includes FindQt4.cmake, which searches the Qt library and headers
find_package(Qt4 REQUIRED)
-if (NOT QT_DBUSXML2CPP_EXECUTABLE)
- message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has been built and installed by Qt")
-endif (NOT QT_DBUSXML2CPP_EXECUTABLE)
-
# Perl is required for building KDE software,
find_package(Perl REQUIRED)
@@ -304,10 +302,9 @@ else (_kdeBootStrapping)
# Check the version of kde. KDE4_KDECONFIG_EXECUTABLE was set by FindKDE4
exec_program(${KDE4_KDECONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE kdeconfig_output )
-
string(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${kdeconfig_output}")
- if (KDEVERSION)
+ if (KDEVERSION)
string(REGEX REPLACE "^KDE: " "" KDEVERSION "${KDEVERSION}")
# we need at least this version:
@@ -317,7 +314,6 @@ else (_kdeBootStrapping)
#message(STATUS "KDE_MIN_VERSION=${KDE_MIN_VERSION} found ${KDEVERSION}")
macro_ensure_version( ${KDE_MIN_VERSION} ${KDEVERSION} KDE4_INSTALLED_VERSION_OK )
-
else (KDEVERSION)
message(FATAL_ERROR "Couldn't parse KDE version string from the kde4-config output:\n${kdeconfig_output}")
endif (KDEVERSION)
@@ -340,8 +336,10 @@ else (_kdeBootStrapping)
# this file contains all dependencies of all libraries of kdelibs, Alex
include(${kde_cmake_module_dir}/KDELibsDependencies.cmake)
- find_library(KDE4_KDEFAKES_LIBRARY NAMES kdefakes PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH )
- set(KDE4_KDEFAKES_LIBS ${kdefakes_LIB_DEPENDS} ${KDE4_KDEFAKES_LIBRARY} )
+ if (UNIX)
+ find_library(KDE4_KDEFAKES_LIBRARY NAMES kdefakes PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH )
+ set(KDE4_KDEFAKES_LIBS ${kdefakes_LIB_DEPENDS} ${KDE4_KDEFAKES_LIBRARY} )
+ endif (UNIX)
find_library(KDE4_KDECORE_LIBRARY NAMES kdecore PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH )
set(KDE4_KDECORE_LIBS ${kdecore_LIB_DEPENDS} ${KDE4_KDECORE_LIBRARY} )
@@ -487,7 +485,7 @@ set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
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(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/
@@ -652,7 +650,7 @@ if(WIN32)
"${CMAKE_INSTALL_PREFIX}/bin" )
endif(WIN32)
-# Differences between CMake 2.4 and 2.6
+
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4)
# some developers may be using an cmake cvs version which didn't have set_property() yet
@@ -661,12 +659,11 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4)
message(FATAL_ERROR "You are using an old version of CMake from cvs, please update to CMake >= 2.6.0 or cvs at least from Feb 20th, 2008")
endif(NOT COMMAND SET_PROPERTY)
-
# CMake 2.6 gives errors if there are multiple targets with the same name
# we use this for the target "buildtests", which is created for the unit tests
# and which depends on the tests, so building "buildtests" builds all the tests
# enabling this property disables this check in CMake
- set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
+ set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
# CMake 2.6 uses the full file names of the libraries when linking and so
# doesn't use -L anymore to list the link dirs. Now the dependencies created
@@ -676,8 +673,23 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4)
# listed nevertheless also with CMake 2.6.
set(CMAKE_LINK_OLD_PATHS TRUE)
+
+ # the following link_directories() command could be inserted in the KDELibsDependencies.cmake
+ # file. This should basically also fix the linking problem for libs with just the
+ # symbolic name (coming from export_library_dependencies()). But this will need
+ # adapting also the other places where export_library_dependencies() is used.
+ # I guess just enabling the compatibility option above is more safe.
+ # Once we require CMake >= 2.6.0 this will be reworked. Alex
+ #
+ # # in CMake 2.6 the handling of the link directories has changed, so we need this here
+ # if(\"\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}\" GREATER 2.4)
+ # link_directories( \"\${KDE4_LIB_INSTALL_DIR}\" )
+ # endif(\"\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}\" GREATER 2.4)
+
endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4)
+
+
##################### and now the platform specific stuff ############################
# Set a default build type for single-configuration
@@ -759,7 +771,7 @@ if (UNIX)
set( _KDE4_DEFAULT_USE_FULL_RPATH OFF )
endif (NOT APPLE)
- option(KDE4_USE_ALWAYS_FULL_RPATH "If set to TRUE, also libs and plugins will be linked with the full RPATH, which will usually make them work better, but make install will take longer." _KDE4_DEFAULT_USE_FULL_RPATH)
+ option(KDE4_USE_ALWAYS_FULL_RPATH "If set to TRUE, also libs and plugins will be linked with the full RPATH, which will usually make them work better, but make install will take longer." ${_KDE4_DEFAULT_USE_FULL_RPATH} )
set( _KDE4_PLATFORM_INCLUDE_DIRS)
@@ -982,15 +994,15 @@ if (CMAKE_C_COMPILER MATCHES "icc")
# 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 -0b0 -noalign")
- set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+ 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 -Ob0 -noalign")
- set(CMAKE_C_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+ 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 -Wpointer-arith -fno-common")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wpointer-arith -fno-exceptions -fno-common")
+ 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)
@@ -1026,13 +1038,13 @@ 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.0 include dir: ${KDE4_INCLUDE_DIR}")
+ message(STATUS "Found KDE 4.1 include dir: ${KDE4_INCLUDE_DIR}")
else(KDE4_INCLUDE_DIR)
message(STATUS "ERROR: unable to find KDE 4 headers")
endif(KDE4_INCLUDE_DIR)
if(KDE4_LIB_DIR)
- message(STATUS "Found KDE 4 library dir: ${KDE4_LIB_DIR}")
+ message(STATUS "Found KDE 4.1 library dir: ${KDE4_LIB_DIR}")
else(KDE4_LIB_DIR)
message(STATUS "ERROR: unable to find KDE 4 core library")
endif(KDE4_LIB_DIR)
@@ -1073,7 +1085,7 @@ 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 ${QT_INCLUDES} ${_KDE4_PLATFORM_INCLUDE_DIRS} )
+set(KDE4_INCLUDES ${KDE4_INCLUDE_DIR} ${KDE4_INCLUDE_DIR}/KDE ${QT_INCLUDES} ${_KDE4_PLATFORM_INCLUDE_DIRS} )
set(KDE4_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS )