diff options
57 files changed, 611 insertions, 320 deletions
diff --git a/automoc/kde4automoc.cpp b/automoc/kde4automoc.cpp index da0d5457..dd1d362e 100644 --- a/automoc/kde4automoc.cpp +++ b/automoc/kde4automoc.cpp @@ -196,7 +196,7 @@ bool AutoMoc::run() basename = basename.right(basename.length() - 4); } bool headerFound = false; - foreach (QString ext, headerExtensions) { + foreach (const QString &ext, headerExtensions) { QString sourceFilePath = absPath + basename + ext; if (QFile::exists(sourceFilePath)) { headerFound = true; @@ -314,7 +314,7 @@ void AutoMoc::generateMoc(const QString &sourceFile, const QString &mocFileName) // we don't want too many child processes #ifdef Q_OS_FREEBSD - static const int max_processes = 1; + static const int max_processes = 0; #else static const int max_processes = 10; #endif diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 3df0bfca..460ef67c 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -4,7 +4,8 @@ file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake") set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules ) -install( FILES cmake-modules-styleguide.txt kde4init_dummy.cpp.in kde4_cmake_uninstall.cmake.in kde4automoc.files.in ${cmakeFiles} DESTINATION ${module_install_dir} ) +install( FILES cmake-modules-styleguide.txt kde4init_dummy.cpp.in kde4_cmake_uninstall.cmake.in kde4automoc.files.in ${cmakeFiles} + DESTINATION ${module_install_dir} ) # the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex #set(FILES_TO_REMOVE diff --git a/modules/CheckPrototypeExists.cmake b/modules/CheckPrototypeExists.cmake index 8afc6f74..811d6489 100644 --- a/modules/CheckPrototypeExists.cmake +++ b/modules/CheckPrototypeExists.cmake @@ -11,7 +11,7 @@ # 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 -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindACL.cmake b/modules/FindACL.cmake index e21e25fa..2c515fdf 100644 --- a/modules/FindACL.cmake +++ b/modules/FindACL.cmake @@ -3,7 +3,7 @@ # # ACL_FOUND - system has the ACL library # ACL_LIBS - The libraries needed to use ACL -# + # Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindAGG.cmake b/modules/FindAGG.cmake index 57b1d29f..b52814e6 100644 --- a/modules/FindAGG.cmake +++ b/modules/FindAGG.cmake @@ -5,7 +5,7 @@ # AGG_INCLUDE_DIR - the AGG include directory # AGG_LIBRARIES - Link these to use AGG # AGG_DEFINITIONS - Compiler switches required for using AGG -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindAkode.cmake b/modules/FindAkode.cmake index 72061d37..9e66eb36 100644 --- a/modules/FindAkode.cmake +++ b/modules/FindAkode.cmake @@ -4,7 +4,7 @@ # AKODE_FOUND - system has the aKode library # AKODE_INCLUDE_DIR - the aKode include directory # AKODE_LIBRARIES - The libraries needed to use aKode -# + # Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindAlsa.cmake b/modules/FindAlsa.cmake index 5b8e43f8..40872ea5 100644 --- a/modules/FindAlsa.cmake +++ b/modules/FindAlsa.cmake @@ -2,10 +2,10 @@ # 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 +# 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 # Copyright (c) 2006, David Faure, <faure@kde.org> # Copyright (c) 2007, Matthias Kretz <kretz@kde.org> diff --git a/modules/FindAvahi.cmake b/modules/FindAvahi.cmake index d328bf19..129e68a6 100644 --- a/modules/FindAvahi.cmake +++ b/modules/FindAvahi.cmake @@ -1,5 +1,5 @@ # Find Avahi. Only avahi-common/defs.h is really needed -# + # Copyright (c) 2007, Jakub Stachowski, <qbast@go2.pl> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindBerkeleyDB.cmake b/modules/FindBerkeleyDB.cmake index 18d475bd..749f1664 100644 --- a/modules/FindBerkeleyDB.cmake +++ b/modules/FindBerkeleyDB.cmake @@ -5,7 +5,7 @@ # 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 -# + # Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindBlitz.cmake b/modules/FindBlitz.cmake index a7aa4a14..a26cf5c8 100644 --- a/modules/FindBlitz.cmake +++ b/modules/FindBlitz.cmake @@ -7,7 +7,7 @@ # BLITZ_FOUND - system has blitz lib # BLITZ_INCLUDES - the blitz include directory # BLITZ_LIBRARIES - The libraries needed to use blitz -# + # Copyright (c) 2006, Montel Laurent, <montel@kde.org> # Copyright (c) 2007, Allen Winter, <winter@kde.org> # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindCarbon.cmake b/modules/FindCarbon.cmake index 38a1aa72..de788f74 100644 --- a/modules/FindCarbon.cmake +++ b/modules/FindCarbon.cmake @@ -1,3 +1,8 @@ +# - Find Carbon on Mac +# +# CARBON_LIBRARY - the library to use Carbon +# CARBON_FOUND - true if Carbon has been found + # Copyright (c) 2006, Benjamin Reed, <ranger@befunk.com> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindENCHANT.cmake b/modules/FindENCHANT.cmake index 7b3e4163..76d577c6 100644 --- a/modules/FindENCHANT.cmake +++ b/modules/FindENCHANT.cmake @@ -5,7 +5,7 @@ # ENCHANT_INCLUDE_DIR - the ENCHANT include directory # ENCHANT_LIBRARIES - Link these to use ENCHANT # ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT -# + # Copyright (c) 2006, Zack Rusin, <zack@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindEigen.cmake b/modules/FindEigen.cmake index 733b2963..1a5fe34f 100644 --- a/modules/FindEigen.cmake +++ b/modules/FindEigen.cmake @@ -3,7 +3,7 @@ # # EIGEN_FOUND - system has eigen lib # EIGEN_INCLUDE_DIR - the eigen include directory -# + # Copyright (c) 2006, 2007 Montel Laurent, <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. @@ -21,7 +21,7 @@ find_path(EIGEN_INCLUDE_DIR NAMES eigen/matrix.h ) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR ) +find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR ) mark_as_advanced(EIGEN_INCLUDE_DIR) diff --git a/modules/FindFAM.cmake b/modules/FindFAM.cmake index 62e34e15..8ebb3ab6 100644 --- a/modules/FindFAM.cmake +++ b/modules/FindFAM.cmake @@ -4,7 +4,7 @@ # FAM_FOUND - system has FAM # FAM_INCLUDE_DIR - the FAM include directory # FAM_LIBRARIES - The libraries needed to use FAM -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindFlex.cmake b/modules/FindFlex.cmake index 631dcd27..01f909c0 100644 --- a/modules/FindFlex.cmake +++ b/modules/FindFlex.cmake @@ -4,7 +4,6 @@ # FLEX_FOUND - system has Flex # FLEX_EXECUTABLE - path of the flex executable # FLEX_VERSION - the version string, like "2.5.31" -# FIND_PROGRAM(FLEX_EXECUTABLE NAMES flex) diff --git a/modules/FindFreetype.cmake b/modules/FindFreetype.cmake index 66198b9e..6fd1bb13 100644 --- a/modules/FindFreetype.cmake +++ b/modules/FindFreetype.cmake @@ -4,7 +4,7 @@ # FREETYPE_FOUND - system has Freetype # FREETYPE_INCLUDE_DIRS - the FREETYPE include directories # FREETYPE_LIBRARIES - Link these to use FREETYPE -# FREETYPE_INCLUDE_DIR is internal and deprecated for use +# FREETYPE_INCLUDE_DIR - internal # Copyright (c) 2006, Laurent Montel, <montel@kde.org> # @@ -19,7 +19,7 @@ if (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR) else (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR) - FIND_PROGRAM(FREETYPECONFIG_EXECUTABLE NAMES freetype-config PATHS + find_program(FREETYPECONFIG_EXECUTABLE NAMES freetype-config PATHS /opt/local/bin ) @@ -30,28 +30,28 @@ else (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR) # if freetype-config has been found if(FREETYPECONFIG_EXECUTABLE) - EXEC_PROGRAM(${FREETYPECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE FREETYPE_LIBRARIES) + exec_program(${FREETYPECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE FREETYPE_LIBRARIES) - EXEC_PROGRAM(${FREETYPECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _freetype_pkgconfig_output) + exec_program(${FREETYPECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _freetype_pkgconfig_output) if(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output) set(FREETYPE_FOUND TRUE) # freetype-config can print out more than one -I, so we need to chop it up # into a list and process each entry separately - SEPARATE_ARGUMENTS(_freetype_pkgconfig_output) - FOREACH(value ${_freetype_pkgconfig_output}) - STRING(REGEX REPLACE "-I(.+)" "\\1" value "${value}") + separate_arguments(_freetype_pkgconfig_output) + foreach(value ${_freetype_pkgconfig_output}) + string(REGEX REPLACE "-I(.+)" "\\1" value "${value}") set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR} ${value}) - ENDFOREACH(value) + endforeach(value) endif(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output) - MARK_AS_ADVANCED(FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIR) + set( FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} CACHE STRING "The libraries for freetype" ) - set( FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} CACHE INTERNAL "The libraries for freetype" ) + mark_as_advanced(FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIR) else(FREETYPECONFIG_EXECUTABLE) - find_path (FREETYPE_INCLUDE_DIR freetype2/freetype/freetype.h) - set (FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR}/freetype2) + find_path (FREETYPE_INCLUDE_DIR freetype2/freetype/freetype.h) + set (FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR}/freetype2) find_library(FREETYPE_LIBRARIES freetype) if(FREETYPE_INCLUDE_DIR AND FREETYPE_LIBRARIES) set(FREETYPE_FOUND TRUE) @@ -59,16 +59,16 @@ else (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR) endif(FREETYPECONFIG_EXECUTABLE) - IF (FREETYPE_FOUND) - IF (NOT Freetype_FIND_QUIETLY) - MESSAGE(STATUS "Found Freetype: ${FREETYPE_LIBRARIES}") - ENDIF (NOT Freetype_FIND_QUIETLY) - ELSE (FREETYPE_FOUND) - IF (Freetype_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find FreeType library") - ENDIF (Freetype_FIND_REQUIRED) - ENDIF (FREETYPE_FOUND) + if (FREETYPE_FOUND) + if (NOT Freetype_FIND_QUIETLY) + message(STATUS "Found Freetype: ${FREETYPE_LIBRARIES}") + endif (NOT Freetype_FIND_QUIETLY) + else (FREETYPE_FOUND) + if (Freetype_FIND_REQUIRED) + message(FATAL_ERROR "Could not find FreeType library") + endif (Freetype_FIND_REQUIRED) + endif (FREETYPE_FOUND) endif (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR) -set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR}) +set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR}") diff --git a/modules/FindGMP.cmake b/modules/FindGMP.cmake index f9efe90c..67ccbbb1 100644 --- a/modules/FindGMP.cmake +++ b/modules/FindGMP.cmake @@ -1,7 +1,7 @@ # 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 +# GMP_FOUND - system has GMP lib +# GMP_INCLUDE_DIR - the GMP include directory +# GMP_LIBRARIES - Libraries needed to use GMP # Copyright (c) 2006, Laurent Montel, <montel@kde.org> # diff --git a/modules/FindGObject.cmake b/modules/FindGObject.cmake index 4e2a03b7..3d3d6b3d 100644 --- a/modules/FindGObject.cmake +++ b/modules/FindGObject.cmake @@ -5,7 +5,7 @@ # GOBJECT_INCLUDE_DIR - the GObject include directory # GOBJECT_LIBRARIES - the libraries needed to use GObject # GOBJECT_DEFINITIONS - Compiler switches required for using GObject -# + # (c)2006, Tim Beaulen <tbscope@gmail.com> diff --git a/modules/FindGSSAPI.cmake b/modules/FindGSSAPI.cmake index 36dffc85..90e803ea 100644 --- a/modules/FindGSSAPI.cmake +++ b/modules/FindGSSAPI.cmake @@ -5,7 +5,7 @@ # GSSAPI_INCS - the GSSAPI include directory # GSSAPI_LIBS - the libraries needed to use GSSAPI # GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL -# + # Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindGStreamer.cmake b/modules/FindGStreamer.cmake index 2d752dd9..f75e92d9 100644 --- a/modules/FindGStreamer.cmake +++ b/modules/FindGStreamer.cmake @@ -5,17 +5,17 @@ # GSTREAMER_INCLUDE_DIR - the GStreamer include directory # GSTREAMER_LIBRARIES - the libraries needed to use GStreamer # GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer -# + # (c)2006, Tim Beaulen <tbscope@gmail.com> # TODO: Other versions --> GSTREAMER_X_Y_FOUND (Example: GSTREAMER_0_8_FOUND and GSTREAMER_0_10_FOUND etc) -IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) # in cache already SET(GStreamer_FIND_QUIETLY TRUE) -ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) SET(GStreamer_FIND_QUIETLY FALSE) -ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) IF (NOT WIN32) # use pkg-config to get the directories and then use these values @@ -40,6 +40,11 @@ FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10 ${_GStreamerLinkDir} ) +FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10 + PATHS + ${_GStreamerLinkDir} + ) + FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10 PATHS ${_GStreamerLinkDir} @@ -63,11 +68,11 @@ ELSE (GSTREAMER_INTERFACE_LIBRARY) MESSAGE(STATUS "GStreamer: WARNING: interface library not found") ENDIF (GSTREAMER_INTERFACE_LIBRARY) -IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) SET(GSTREAMER_FOUND TRUE) -ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) SET(GSTREAMER_FOUND FALSE) -ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_INTERFACE_LIBRARY) +ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) IF (GSTREAMER_FOUND) IF (NOT GStreamer_FIND_QUIETLY) @@ -79,4 +84,4 @@ ELSE (GSTREAMER_FOUND) ENDIF (GStreamer_FIND_REQUIRED) ENDIF (GSTREAMER_FOUND) -MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_INTERFACE_LIBRARY) +MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY) 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 ) diff --git a/modules/FindKDEWIN.cmake b/modules/FindKDEWIN.cmake index 5694e533..550d11d3 100644 --- a/modules/FindKDEWIN.cmake +++ b/modules/FindKDEWIN.cmake @@ -6,7 +6,7 @@ # this will define # KDEWIN_FOUND - system has KDEWIN # KDEWIN_DIR - the KDEWIN root installation dir -# + # Copyright (c) 2007, Ralf Habacker, <ralf.habacker@freenet.de> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index aa62f649..589b1531 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -5,7 +5,7 @@ # KDEWIN32_FOUND - system has KDEWIN32 # KDEWIN32_INCLUDES - the KDEWIN32 include directories # KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32 -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # Copyright (c) 2007, Ralf Habacker, <ralf.habacker@freenet.de> # diff --git a/modules/FindKdeMultimedia.cmake b/modules/FindKdeMultimedia.cmake index 457f345d..c8850291 100644 --- a/modules/FindKdeMultimedia.cmake +++ b/modules/FindKdeMultimedia.cmake @@ -1,4 +1,11 @@ -# cmake macro to see if we have kdemultimedia installed +# 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 # KDEMULTIMEDIA_INCLUDE_DIR # KDEMULTIMEDIA_FOUND diff --git a/modules/FindKorundum.cmake b/modules/FindKorundum.cmake index 59ad44b1..d921f611 100644 --- a/modules/FindKorundum.cmake +++ b/modules/FindKorundum.cmake @@ -1,24 +1,20 @@ # - 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 + # Copyright (c) 2006, Egon Willighagen, <egonw@users.sf.net> # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -FIND_PATH(Korumdum_PATH Korundum.rb /usr/lib/ruby/1.8) +find_path(KORUNDUM_PATH Korundum.rb /usr/lib/ruby/1.8) -IF (Korumdum_PATH) - SET(Korumdum_FOUND TRUE) -ENDIF (Korumdum_PATH) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Korundum DEFAULT_MSG KORUNDUM_PATH) -IF (Korumdum_FOUND) - IF (NOT Korumdum_FIND_QUIETLY) - MESSAGE(STATUS "Found Korumdum: ${Korumdum_PATH}") - ENDIF (NOT Korumdum_FIND_QUIETLY) -ELSE (Korumdum_FOUND) - IF (Korumdum_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Korumdum") - ENDIF (Korumdum_FIND_REQUIRED) -ENDIF (Korumdum_FOUND)
\ No newline at end of file +# just for compat.: +set(Korumdum_PATH ${KORUNDUM_PATH}) +set(Korumdum_FOUND ${KORUNDUM_FOUND}) diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 86282196..59687877 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -4,7 +4,7 @@ # LIBART_FOUND - system has the LibArt # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake index e4d0539e..b421ca85 100644 --- a/modules/FindLibintl.cmake +++ b/modules/FindLibintl.cmake @@ -9,7 +9,7 @@ # 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). -# + # Copyright (c) 2006, Chusslove Illich, <caslav.ilic@gmx.net> # Copyright (c) 2007, Alexander Neundorf, <neundorf@kde.org> # diff --git a/modules/FindMsgfmt.cmake b/modules/FindMsgfmt.cmake index f578b3a2..47c61219 100644 --- a/modules/FindMsgfmt.cmake +++ b/modules/FindMsgfmt.cmake @@ -2,7 +2,7 @@ # Once done this will define # # MSGFMT_FOUND - system has msgfmt -# + # Copyright (c) 2007, Montel Laurent <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindMusicBrainz.cmake b/modules/FindMusicBrainz.cmake index 09884115..9f2ad985 100644 --- a/modules/FindMusicBrainz.cmake +++ b/modules/FindMusicBrainz.cmake @@ -1,5 +1,10 @@ -# Option for build or not MusicBrainz +# 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 + # Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindMySQL.cmake b/modules/FindMySQL.cmake index daa6d84f..21604c73 100644 --- a/modules/FindMySQL.cmake +++ b/modules/FindMySQL.cmake @@ -6,7 +6,7 @@ # MYSQL_EMBEDDED_LIBRARIES, the libraries needed to use MySQL Embedded. # MYSQL_FOUND, If false, do not try to use MySQL. # MYSQL_EMBEDDED_FOUND, If false, do not try to use MySQL Embedded. -# + # Copyright (c) 2006, Jaroslaw Staniek, <js@iidea.pl> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindOpenEXR.cmake b/modules/FindOpenEXR.cmake index 66c57194..cd443c0a 100644 --- a/modules/FindOpenEXR.cmake +++ b/modules/FindOpenEXR.cmake @@ -5,7 +5,7 @@ # OPENEXR_INCLUDE_DIR - OpenEXR include directory # OPENEXR_LIBRARIES - Libraries needed to use OpenEXR # OPENEXR_DEFINITIONS - definitions required to use OpenEXR -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 2b5313d9..1b915530 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -5,6 +5,7 @@ # 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 + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake index f0cc940d..0eba2e3a 100644 --- a/modules/FindPCRE.cmake +++ b/modules/FindPCRE.cmake @@ -4,27 +4,27 @@ # PCRE_FOUND - system has the PCRE library # PCRE_INCLUDE_DIR - the PCRE include directory # PCRE_LIBRARIES - The libraries needed to use PCRE -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) +if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) # Already in cache, be silent set(PCRE_FIND_QUIETLY TRUE) -endif (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) +endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) -FIND_PATH(PCRE_INCLUDE_DIR pcre.h ) +FIND_PATH(PCRE_INCLUDE_DIR pcre.h PATH_SUFFIXES pcre) FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre) FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix) -set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE") - include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_LIBRARIES ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY ) + +set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE") MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) diff --git a/modules/FindPNG.cmake b/modules/FindPNG.cmake index 6939805b..d00c93a0 100644 --- a/modules/FindPNG.cmake +++ b/modules/FindPNG.cmake @@ -1,6 +1,5 @@ # - Find the native PNG includes and library # - # This module defines # PNG_INCLUDE_DIR, where to find png.h, etc. # PNG_LIBRARIES, the libraries to link against to use PNG. @@ -10,7 +9,7 @@ # PNG_LIBRARY, where to find the PNG library. # None of the above will be defined unles zlib can be found. # PNG depends on Zlib -# + # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. diff --git a/modules/FindPackageHandleStandardArgs.cmake b/modules/FindPackageHandleStandardArgs.cmake index 151d8125..7f122edc 100644 --- a/modules/FindPackageHandleStandardArgs.cmake +++ b/modules/FindPackageHandleStandardArgs.cmake @@ -1,21 +1,23 @@ # FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... ) -# This macro is intended to be used in FindXXX.cmake modules files. -# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and -# it also sets the <UPPERCASED_NAME>_FOUND variable. -# The package is found if all variables listed are TRUE. -# Example: +# +# This macro is intended to be used in FindXXX.cmake modules files. +# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and +# it also sets the <UPPERCASED_NAME>_FOUND variable. +# The package is found if all variables listed are TRUE. +# Example: # # FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) # -# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and -# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. -# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, -# independent whether QUIET was used or not. -# If it is found, the location is reported using the VAR1 argument, so -# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out. -# If the second argument is DEFAULT_MSG, the message in the failure case will -# be "Could NOT find LibXml2", if you don't like this message you can specify -# your own custom failure message there. +# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and +# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. +# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, +# independent whether QUIET was used or not. +# +# If it is found, the location is reported using the VAR1 argument, so +# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out. +# If the second argument is DEFAULT_MSG, the message in the failure case will +# be "Could NOT find LibXml2", if you don't like this message you can specify +# your own custom failure message there. MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 ) diff --git a/modules/FindPostgreSQL.cmake b/modules/FindPostgreSQL.cmake index 43cb1865..ab352c7c 100644 --- a/modules/FindPostgreSQL.cmake +++ b/modules/FindPostgreSQL.cmake @@ -4,7 +4,7 @@ # 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. -# + # Copyright (c) 2006, Jaroslaw Staniek, <js@iidea.pl> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindQCA2.cmake b/modules/FindQCA2.cmake index b0f898f7..950d923c 100644 --- a/modules/FindQCA2.cmake +++ b/modules/FindQCA2.cmake @@ -8,7 +8,7 @@ # # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls -# + # Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindQImageBlitz.cmake b/modules/FindQImageBlitz.cmake index 978b2588..ae610f1e 100644 --- a/modules/FindQImageBlitz.cmake +++ b/modules/FindQImageBlitz.cmake @@ -4,7 +4,7 @@ # QIMAGEBLITZ_FOUND - system has qimageblitz lib # QIMAGEBLITZ_INCLUDES - the qimageblitz include directory # QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz -# + # Copyright (c) 2006, Montel Laurent, <montel@kde.org> # Copyright (c) 2007, Allen Winter, <winter@kde.org> # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index f8d0f562..035863f4 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -24,6 +24,10 @@ # QT_USE_QTUITOOLS # QT_USE_QTDBUS # QT_USE_QTSCRIPT +# QT_USE_QTASSISTANTCLIENT +# QT_USE_QTHELP +# QT_USE_QTWEBKIT +# QT_USE_QTXMLPATTERNS # # All the libraries required are stored in a variable called QT_LIBRARIES. # Add this variable to your TARGET_LINK_LIBRARIES. @@ -96,6 +100,10 @@ # 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_DEFINITIONS Definitions to use when compiling code that uses Qt. # @@ -123,6 +131,10 @@ # 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_LIBRARY_DIR Path to "lib" of Qt4 # @@ -166,6 +178,18 @@ # 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 + + + # # also defined, but NOT for general use are # QT_MOC_EXECUTABLE Where to find the moc tool. @@ -599,7 +623,34 @@ IF (QT4_QMAKE_FOUND) ${QT_HEADERS_DIR}/QtDBus NO_DEFAULT_PATH ) - + # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR + FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QtAssistantClient + PATHS + ${QT_INCLUDE_DIR}/QtAssistant + ${QT_HEADERS_DIR}/QtAssistant + NO_DEFAULT_PATH + ) + # Set QT_QTHELP_INCLUDE_DIR + FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp + PATHS + ${QT_INCLUDE_DIR}/QtHelp + ${QT_HEADERS_DIR}/QtHelp + NO_DEFAULT_PATH + ) + # Set QT_QTWEBKIT_INCLUDE_DIR + FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit + PATHS + ${QT_INCLUDE_DIR}/QtWebKit + ${QT_HEADERS_DIR}/QtWebKit + NO_DEFAULT_PATH + ) + # Set QT_QTXMLPATTERNS_INCLUDE_DIR + FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns + PATHS + ${QT_INCLUDE_DIR}/QtXmlPatterns + ${QT_HEADERS_DIR}/QtXmlPatterns + NO_DEFAULT_PATH + ) # Make variables changeble to the advanced user MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR) @@ -686,6 +737,28 @@ IF (QT4_QMAKE_FOUND) SET(QT_QTTEST_FOUND FALSE) ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework) + IF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework) + SET(QT_QTASSISTANTCLIENT_FOUND TRUE) + SET(QT_QTASSISTANTCLIENT_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtAssistantClient" CACHE STRING "The QtAssistantClient library.") + ELSE(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework) + SET(QT_QTASSISTANTCLIENT_FOUND FALSE) + ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework) + + IF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework) + SET(QT_QTWEBKIT_FOUND TRUE) + SET(QT_QTWEBKIT_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtWebKit" CACHE STRING "The QtWebKit library.") + ELSE(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework) + SET(QT_QTWEBKIT_FOUND FALSE) + ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework) + + IF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework) + SET(QT_QTXMLPATTERNS_FOUND TRUE) + SET(QT_QTXMLPATTERNS_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtXmlPatterns" CACHE STRING "The QtXmlPatterns library.") + ELSE(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework) + SET(QT_QTXMLPATTERNS_FOUND FALSE) + ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework) + + # WTF? why don't we have frameworks? :P # Set QT_QTUITOOLS_LIBRARY FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} ) @@ -737,6 +810,15 @@ IF (QT4_QMAKE_FOUND) FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus4 QtDBusd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + FIND_LIBRARY(QT_QTHELP_LIBRARY NAMES QtHelp QtHelp4 QtHelpd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + FIND_LIBRARY(QT_QTWEBKIT_LIBRARY NAMES QtWebKit QtWebKit4 QtWebKitd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY NAMES QtXmlPatterns QtXmlPatterns4 QtXmlPatternsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + IF(MSVC) FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE NAMES QtCore4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG NAMES QtCored4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) @@ -859,6 +941,10 @@ IF (QT4_QMAKE_FOUND) _QT4_ADJUST_LIB_VARS(QTUITOOLS) _QT4_ADJUST_LIB_VARS(QTTEST) _QT4_ADJUST_LIB_VARS(QTDBUS) + _QT4_ADJUST_LIB_VARS(QTWEBKIT) + _QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT) + _QT4_ADJUST_LIB_VARS(QTHELP) + _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS) # platform dependent libraries IF(Q_WS_X11) diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index ee44bae2..b5d3c0fd 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -7,7 +7,7 @@ # 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. -# + # Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. @@ -57,7 +57,7 @@ IF(RUBY_EXECUTABLE) FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h - PATHS ${RUBY_ARCH_DIR} + PATHS ${RUBY_ARCH_DIR} /usr/include/ruby-${RUBY_VERSION} ) FIND_LIBRARY(RUBY_LIBRARY diff --git a/modules/FindSamba.cmake b/modules/FindSamba.cmake index 08c0fee3..16522c64 100644 --- a/modules/FindSamba.cmake +++ b/modules/FindSamba.cmake @@ -29,12 +29,18 @@ if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) include(MacroPushRequiredVars) macro_push_required_vars() set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SAMBA_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SAMBA_INCLUDE_DIR}) check_symbol_exists(smbc_set_context "libsmbclient.h" SAMBA_HAVE_SMBC_SET_CONTEXT) + check_symbol_exists(smbc_option_set "libsmbclient.h" SAMBA_HAVE_SMBC_OPTION_SET) macro_pop_required_vars() # fail if smbc_set_context() was required but hasn't been found if (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) set(SAMBA_FOUND FALSE) endif (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) + # fail if smbc_option_set() was required but hasn't been found + if (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) + set(SAMBA_FOUND FALSE) + endif (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) else(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) set(SAMBA_FOUND FALSE) diff --git a/modules/FindSasl2.cmake b/modules/FindSasl2.cmake index f69aea6f..855266fc 100644 --- a/modules/FindSasl2.cmake +++ b/modules/FindSasl2.cmake @@ -4,7 +4,7 @@ # SASL2_FOUND - system has SASL2 # SASL2_INCLUDE_DIR - the SASL2 include directory # SASL2_LIBRARIES - The libraries needed to use SASL2 -# + # Copyright (c) 2006, 2007 Laurent Montel, <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindSharedMimeInfo.cmake b/modules/FindSharedMimeInfo.cmake index f3ca64cc..e3966b86 100644 --- a/modules/FindSharedMimeInfo.cmake +++ b/modules/FindSharedMimeInfo.cmake @@ -10,7 +10,9 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # the minimum version of shared-mime-database we require -set(SHARED_MIME_INFO_MINIMUM_VERSION "0.20") +if (NOT SHARED_MIME_INFO_MINIMUM_VERSION) + set(SHARED_MIME_INFO_MINIMUM_VERSION "0.18") +endif (NOT SHARED_MIME_INFO_MINIMUM_VERSION) if (UPDATE_MIME_DATABASE_EXECUTABLE) @@ -37,7 +39,7 @@ else (UPDATE_MIME_DATABASE_EXECUTABLE) message(STATUS "Found shared-mime-info version: ${smiVersion}") macro_ensure_version(${SHARED_MIME_INFO_MINIMUM_VERSION} ${smiVersion} _smiVersion_OK) if (NOT _smiVersion_OK) - message(STATUS "WARNING: the found version of shared-mime-info (${smiVersion}) is below the minimum required (${SHARED_MIME_INFO_MINIMUM_VERSION})") + message(FATAL_ERROR "The found version of shared-mime-info (${smiVersion}) is below the minimum required (${SHARED_MIME_INFO_MINIMUM_VERSION})") endif (NOT _smiVersion_OK) endif (NOT SharedMimeInfo_FIND_QUIETLY) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 93e01a01..0cc278b0 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -1,4 +1,18 @@ - +# +# 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) +# +# Options: +# Set SOPRANO_MIN_VERSION to set the minimum required Soprano version (default: 1.99) +# #if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES) @@ -55,7 +69,6 @@ ) # check for all the libs as required to make sure that we do not try to compile with an old version - # FIXME: introduce a Soprano version check if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) set(Soprano_FOUND TRUE) @@ -74,15 +87,25 @@ endif(Soprano_FOUND AND SOPRANO_SERVER_LIBRARIES) # check Soprano version + + # We set a default for the minimum required version to be backwards compatible + IF(NOT SOPRANO_MIN_VERSION) + SET(SOPRANO_MIN_VERSION "1.99") + ENDIF(NOT SOPRANO_MIN_VERSION) + if(Soprano_FOUND) FILE(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) STRING(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) IF (SOPRANO_VERSION_MATCH) STRING(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) - if(SOPRANO_VERSION STRLESS "1.99") + if(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") set(Soprano_FOUND FALSE) - message(FATAL_ERROR "Soprano version ${SOPRANO_VERSION} is too old. Please install 1.99 or newer") - endif(SOPRANO_VERSION STRLESS "1.99") + if(Soprano_FIND_REQUIRED) + message(FATAL_ERROR "Soprano version ${SOPRANO_VERSION} is too old. Please install ${SOPRANO_MIN_VERSION} or newer") + else(Soprano_FIND_REQUIRED) + message(STATUS "Soprano version ${SOPRANO_VERSION} is too old. Please install ${SOPRANO_MIN_VERSION} or newer") + endif(Soprano_FIND_REQUIRED) + endif(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") ENDIF (SOPRANO_VERSION_MATCH) endif(Soprano_FOUND) diff --git a/modules/FindStrigi.cmake b/modules/FindStrigi.cmake index b34596e1..8772731b 100644 --- a/modules/FindStrigi.cmake +++ b/modules/FindStrigi.cmake @@ -5,6 +5,8 @@ # 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 # at first search only in the specified directories (NO_DEFAULT_PATH) # only if it wasn't found there, the second call to FIND_PATH/LIBRARY() @@ -115,7 +117,36 @@ endif (NOT WIN32 AND NOT HAVE_STRIGI_VERSION) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Strigi - "Couldn't find Strigi streams library. Set the environment variable STRIGI_HOME (or CMAKE_FIND_PREFIX_PATH if using CMake >=2.5) to the strigi install dir." + "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_FIND_PREFIX_PATH if using CMake >=2.5) to the strigi install dir." STRIGI_STREAMS_LIBRARY STRIGI_STREAMANALYZER_LIBRARY STRIGI_INCLUDE_DIR) -mark_as_advanced(STRIGI_INCLUDE_DIR STRIGI_STREAMANALYZER_LIBRARY STRIGI_STREAMS_LIBRARY STRIGI_STRIGIQTDBUSCLIENT_LIBRARY ) +if(WIN32) + # this is needed to have mingw, cygwin and msvc libs installed in one directory + if(MSVC) + set(STRIGI_LINE_ANALYZER_PREFIX msvc_strigila_) + elseif(CYGWIN) + set(STRIGI_LINE_ANALYZER_PREFIX cyg_strigila_) + elseif(MINGW) + set(STRIGI_LINE_ANALYZER_PREFIX mingw_strigila_) + endif(MSVC) +else(WIN32) + set(STRIGI_LINE_ANALYZER_PREFIX strigila_) +endif(WIN32) + +if(WIN32) + # this is needed to have mingw, cygwin and msvc libs installed in one directory + if(MSVC) + set(STRIGI_THROUGH_ANALYZER_PREFIX msvc_strigita_) + elseif(CYGWIN) + set(STRIGI_THROUGH_ANALYZER_PREFIX cyg_strigita_) + elseif(MINGW) + set(STRIGI_THROUGH_ANALYZER_PREFIX mingw_strigita_) + endif(MSVC) +else(WIN32) + set(STRIGI_THROUGH_ANALYZER_PREFIX strigita_) +endif(WIN32) + +mark_as_advanced(STRIGI_INCLUDE_DIR STRIGI_STREAMANALYZER_LIBRARY STRIGI_STREAMS_LIBRARY STRIGI_STRIGIQTDBUSCLIENT_LIBRARY + STRIGI_LINE_ANALYZER_PREFIX + STRIGI_THROUGH_ANALYZER_PREFIX +) diff --git a/modules/FindTIFF.cmake b/modules/FindTIFF.cmake index 49261dd7..24b75b9f 100644 --- a/modules/FindTIFF.cmake +++ b/modules/FindTIFF.cmake @@ -6,7 +6,7 @@ # TIFF_FOUND, If false, do NOT try to use TIFF. # also defined, but NOT for general use are # TIFF_LIBRARY, where to find the TIFF library. -# + # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 225fa53d..82306883 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -4,7 +4,7 @@ # TAGLIB_FOUND - system has the taglib library # TAGLIB_CFLAGS - the taglib cflags # TAGLIB_LIBRARIES - The libraries needed to use taglib -# + # Copyright (c) 2006, Laurent Montel, <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindUSB.cmake b/modules/FindUSB.cmake index 17d893c9..ff18d3b3 100644 --- a/modules/FindUSB.cmake +++ b/modules/FindUSB.cmake @@ -4,7 +4,7 @@ # LIBUSB_FOUND - system has libusb # LIBUSB_INCLUDE_DIR - the libusb include directory # LIBUSB_LIBRARIES - Link these to use libusb -# + # Copyright (c) 2006, Laurent Montel, <montel@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/FindX11.cmake b/modules/FindX11.cmake index 5fdbe82f..193723bc 100644 --- a/modules/FindX11.cmake +++ b/modules/FindX11.cmake @@ -415,7 +415,6 @@ IF (UNIX) X11_Xaccessrules_INCLUDE_PATH X11_Xaccessstr_INCLUDE_PATH X11_Xdmcp_INCLUDE_PATH - X11_xf86misc_INCLUDE_PATH X11_Xkb_INCLUDE_PATH X11_Xkblib_INCLUDE_PATH X11_Xkbfile_INCLUDE_PATH diff --git a/modules/FindXine.cmake b/modules/FindXine.cmake new file mode 100644 index 00000000..534613a6 --- /dev/null +++ b/modules/FindXine.cmake @@ -0,0 +1,72 @@ +# - 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 + +# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> +# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (XINE_INCLUDE_DIR AND XINE_LIBRARY) + # Already in cache, be silent + set(Xine_FIND_QUIETLY TRUE) +endif (XINE_INCLUDE_DIR AND XINE_LIBRARY) + IF (NOT WIN32) + INCLUDE(UsePkgConfig) + PKGCONFIG(libxine _LibXineIncDir _LibXineLinkDir _LibXineLinkFlags _LibXineCflags) + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS "--variable=prefix libxine" OUTPUT_VARIABLE _LibXinePrefix) + ENDIF (NOT WIN32) +FIND_PATH(XINE_INCLUDE_DIR NAMES xine.h + PATHS + ${_LibXineIncDir} + NO_DEFAULT_PATH) + +FIND_LIBRARY(XINE_LIBRARY NAMES xine + PATHS + ${_LibXineLinkDir} + NO_DEFAULT_PATH +) + +FIND_PROGRAM(XINECONFIG_EXECUTABLE NAMES xine-config PATHS + ${_LibXinePrefix}/bin +) + +if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) + EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION) + macro_ensure_version(1.1.1 ${XINE_VERSION} XINE_VERSION_OK) + if (XINE_VERSION_OK) + set(XINE_FOUND TRUE) + string(REGEX REPLACE "[0-9].[0-9]." "" XINE_BUGFIX_VERSION ${XINE_VERSION}) + endif (XINE_VERSION_OK) +endif (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) + + +if( XINE_FOUND ) + INCLUDE(CheckCSourceCompiles) + SET(CMAKE_REQUIRED_INCLUDES ${XINE_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${XINE_LIBRARY}) + CHECK_C_SOURCE_COMPILES("#include <xine.h>\nint main()\n{\n xine_open_video_driver(xine_new(), \"auto\", XINE_VISUAL_TYPE_XCB, NULL);\n return 0;\n}\n" XINE_XCB_FOUND) +endif(XINE_FOUND) + +if (XINE_FOUND) + if (NOT Xine_FIND_QUIETLY) + message(STATUS "Found XINE: ${XINE_LIBRARY}") + endif (NOT Xine_FIND_QUIETLY) + # if(XINECONFIG_EXECUTABLE) + # EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --plugindir RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINEPLUGINSDIR) + # MESSAGE(STATUS "XINEPLUGINSDIR :<${XINEPLUGINSDIR}>") + # endif(XINECONFIG_EXECUTABLE) +else (XINE_FOUND) + if (Xine_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find XINE 1.1.1 or greater") + endif (Xine_FIND_REQUIRED) +endif (XINE_FOUND) + +MARK_AS_ADVANCED(XINE_INCLUDE_DIR XINE_LIBRARY) diff --git a/modules/FindXmms.cmake b/modules/FindXmms.cmake index 7eb2d383..a366cfd0 100644 --- a/modules/FindXmms.cmake +++ b/modules/FindXmms.cmake @@ -4,7 +4,7 @@ # XMMS_FOUND - system has xmms # XMMS_INCLUDE_DIRS - the xmms include directory # XMMS_LDFLAGS - Link these to use xmms -# + # Copyright (c) 2006, 2007 Laurent Montel, <montel@kde.org> # Copyright (c) 2007 Allen Winter <winter@kde.org> # diff --git a/modules/KDE4Defaults.cmake b/modules/KDE4Defaults.cmake index b94eaf6d..d81b265e 100644 --- a/modules/KDE4Defaults.cmake +++ b/modules/KDE4Defaults.cmake @@ -27,10 +27,10 @@ set(CMAKE_USE_CHRPATH ON) # define the generic version of the libraries here # this makes it easy to advance it when the next KDE release comes -set(GENERIC_LIB_VERSION "4.0.0") +set(GENERIC_LIB_VERSION "4.1.0") set(GENERIC_LIB_SOVERSION "4") -set(KDE_NON_GENERIC_LIB_VERSION "5.0.0") +set(KDE_NON_GENERIC_LIB_VERSION "5.1.0") set(KDE_NON_GENERIC_LIB_SOVERSION "5") # windows does not support LD_LIBRARY_PATH or similar diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 247eda79..fe08faa2 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1,5 +1,5 @@ # for documentation look at FindKDE4Internal.cmake -# + # this file contains the following macros: # KDE4_ADD_UI_FILES # KDE4_ADD_UI3_FILES @@ -19,7 +19,7 @@ # KDE4_REMOVE_OBSOLETE_CMAKE_FILES # KDE4_NO_ENABLE_FINAL # KDE4_CREATE_HANDBOOK -# KDE4_ADD_WIN32_APP_ICON (Use on Win32) +# KDE4_ADD_APP_ICON # KDE4_CREATE_MANPAGE # Copyright (c) 2006, 2007, Alexander Neundorf, <neundorf@kde.org> @@ -173,7 +173,7 @@ macro (KDE4_MOC_HEADERS _target_NAME) # need to create moc_<filename>.cpp file using kde4automoc.cmake # and add it to the target if(_headers_to_moc) - KDE4_SET_CUSTOM_TARGET_PROPERTY(${_target_NAME} AUTOMOC_HEADERS "${_headers_to_moc}") + kde4_set_custom_target_property(${_target_NAME} AUTOMOC_HEADERS "${_headers_to_moc}") endif(_headers_to_moc) endmacro (KDE4_MOC_HEADERS) @@ -182,7 +182,7 @@ macro(KDE4_HANDLE_AUTOMOC _target_NAME _SRCS) set(_moc_headers) # first list all explicitly set headers - KDE4_GET_CUSTOM_TARGET_PROPERTY(_headers_to_moc ${_target_NAME} AUTOMOC_HEADERS) + kde4_get_custom_target_property(_headers_to_moc ${_target_NAME} AUTOMOC_HEADERS) if(NOT _headers_to_moc STREQUAL "NOTFOUND") foreach(_header_to_moc ${_headers_to_moc}) get_filename_component(_abs_header ${_header_to_moc} ABSOLUTE) @@ -218,8 +218,8 @@ macro(KDE4_HANDLE_AUTOMOC _target_NAME _SRCS) if(_moc_files) set(_automoc_source "${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_automoc.cpp") - GET_DIRECTORY_PROPERTY(_moc_incs INCLUDE_DIRECTORIES) - CONFIGURE_FILE(${KDE4_MODULE_DIR}/kde4automoc.files.in ${_automoc_source}.files) + get_directory_property(_moc_incs INCLUDE_DIRECTORIES) + configure_file(${KDE4_MODULE_DIR}/kde4automoc.files.in ${_automoc_source}.files) add_custom_command(OUTPUT ${_automoc_source} COMMAND ${KDE4_AUTOMOC_EXECUTABLE} ${_automoc_source} @@ -270,7 +270,9 @@ macro (KDE4_CREATE_HANDBOOK _docbook) DEPENDS ${_docs} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - add_custom_target(handbook ALL DEPENDS ${_doc}) + get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) + set(_targ "${_targ}-handbook") + add_custom_target(${_targ} ALL DEPENDS ${_doc}) if(KDE4_ENABLE_HTMLHANDBOOK) set(_htmlDoc ${CMAKE_CURRENT_SOURCE_DIR}/index.html) @@ -336,7 +338,9 @@ macro (KDE4_CREATE_MANPAGE _docbook _section) COMMAND ${KDE4_MEINPROC_EXECUTABLE} --stylesheet ${_ssheet} --check ${_bootstrapOption} ${_input} DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet} ) - add_custom_target(manpage ALL DEPENDS "${_outdoc}") + get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME) + set(_targ "${_targ}-manpage") + add_custom_target(${_targ} ALL DEPENDS "${_outdoc}") set(_args ${ARGN}) @@ -406,7 +410,7 @@ set(_KDE4_ICON_THEME_hi "hicolor") # only used internally by KDE4_INSTALL_ICONS -macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME) +macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME _l10n_SUBDIR) # if the string doesn't match the pattern, the result is the full string, so all three have the same content if (NOT ${_group} STREQUAL ${_install_NAME} ) @@ -414,8 +418,8 @@ macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NA if(NOT _icon_GROUP) set(_icon_GROUP "actions") endif(NOT _icon_GROUP) -# message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name}" ) - install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/ RENAME ${_install_NAME} ) +# message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name} l10n: ${_l10n_SUBDIR}") + install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/${_l10n_SUBDIR}/ RENAME ${_install_NAME} ) endif (NOT ${_group} STREQUAL ${_install_NAME} ) endmacro (_KDE4_ADD_ICON_INSTALL_RULE) @@ -423,6 +427,14 @@ endmacro (_KDE4_ADD_ICON_INSTALL_RULE) macro (KDE4_INSTALL_ICONS _defaultpath ) + # the l10n-subdir if language given as second argument (localized icon) + set(_lang ${ARGV1}) + if(_lang) + set(_l10n_SUBDIR l10n/${_lang}) + else(_lang) + set(_l10n_SUBDIR ".") + endif(_lang) + # first the png icons file(GLOB _icons *.png) foreach (_current_ICON ${_icons} ) @@ -435,7 +447,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath ) if( _theme_GROUP) _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} - ${_group} ${_current_ICON} ${_name}) + ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) endif( _theme_GROUP) endforeach (_current_ICON) @@ -451,7 +463,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath ) if( _theme_GROUP) _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} - ${_group} ${_current_ICON} ${_name}) + ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) endif( _theme_GROUP) endforeach (_current_ICON) @@ -466,7 +478,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath ) if( _theme_GROUP) _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake ${_defaultpath}/${_theme_GROUP}/scalable - ${_group} ${_current_ICON} ${_name}) + ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR}) endif( _theme_GROUP) endforeach (_current_ICON) @@ -537,15 +549,15 @@ macro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE _target_NAME _type) # set the RPATH related properties if (NOT CMAKE_SKIP_RPATH) if (${_type} STREQUAL "GUI") - set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) + set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) endif (${_type} STREQUAL "GUI") if (${_type} STREQUAL "NOGUI") - set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) + set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE) endif (${_type} STREQUAL "NOGUI") if (${_type} STREQUAL "RUN_UNINSTALLED") - set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) + set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) endif (${_type} STREQUAL "RUN_UNINSTALLED") endif (NOT CMAKE_SKIP_RPATH) @@ -1015,41 +1027,43 @@ endmacro (KDE4_ADD_WIN32_APP_ICON) # example: KDE4_ADD_APP_ICON( myapp_sources "icons/oxygen/*/apps/myapp.png") macro (KDE4_ADD_APP_ICON appsources pattern) - STRING(REPLACE _SRCS "" target ${appsources}) + string(REPLACE _SRCS "" target ${appsources}) if (WIN32) find_program(PNG2ICO_EXECUTABLE NAMES png2ico) find_program(WINDRES_EXECUTABLE NAMES windres) if(MSVC) set(WINDRES_EXECUTABLE TRUE) - endif(MSVC) + endif(MSVC) if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) + string(REPLACE "*" "(.*)" pattern_rx "${pattern}") file(GLOB_RECURSE files "${pattern}") - FOREACH (it ${files}) - if (it MATCHES ".*16.*" ) + foreach (it ${files}) + string(REGEX REPLACE "${pattern_rx}" "\\1" fn "${it}") + if (fn MATCHES ".*16.*" ) list (APPEND _icons ${it}) - endif (it MATCHES ".*16.*") - if (it MATCHES ".*32.*" ) + endif (fn MATCHES ".*16.*") + if (fn MATCHES ".*32.*" ) list (APPEND _icons ${it}) - endif (it MATCHES ".*32.*") - if (it MATCHES ".*48.*" ) + endif (fn MATCHES ".*32.*") + if (fn MATCHES ".*48.*" ) list (APPEND _icons ${it}) - endif (it MATCHES ".*48.*") - if (it MATCHES ".*64.*" ) + endif (fn MATCHES ".*48.*") + if (fn MATCHES ".*64.*" ) list (APPEND _icons ${it}) - endif (it MATCHES ".*64.*") - if (it MATCHES ".*128.*" ) + endif (fn MATCHES ".*64.*") + if (fn MATCHES ".*128.*" ) list (APPEND _icons ${it}) - endif (it MATCHES ".*128.*") - ENDFOREACH (it) + endif (fn MATCHES ".*128.*") + endforeach (it) if (_icons) set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target}) - ADD_CUSTOM_COMMAND(OUTPUT ${_outfilename}.ico ${_outfilename}.rc + add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons} DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) if (MINGW) - ADD_CUSTOM_COMMAND(OUTPUT ${_outfilename}_res.o + add_custom_command(OUTPUT ${_outfilename}_res.o COMMAND ${WINDRES_EXECUTABLE} ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${WINDRES_EXECUTABLE} ${_outfilename}.rc WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -1073,11 +1087,11 @@ macro (KDE4_ADD_APP_ICON appsources pattern) if (SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) file(GLOB_RECURSE files "${pattern}") # we can only test for the 128-icon like that - we don't use patterns anymore - FOREACH (it ${files}) + foreach (it ${files}) if (it MATCHES ".*128.*" ) set (_icon ${it}) endif (it MATCHES ".*128.*") - ENDFOREACH (it) + endforeach (it) set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target}) if (_icon) diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 9476cf64..18aeca27 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -18,32 +18,54 @@ # # 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 +# macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) + # init + set(NEPOMUK_RESOURCES_GENERATED false) + FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR}) + if(NOT RCGEN) - message( FATAL_ERROR "Failed to find the KMetaData source generator" ) - endif(NOT RCGEN) - FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + message(STATUS "Failed to find the Nepomuk source generator" ) - execute_process( - COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_headers} - ) - - execute_process( - COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_sources} - ) - - execute_process( - COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} - OUTPUT_VARIABLE ${out_includes} - ) - - execute_process( - COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} - ) + else(NOT RCGEN) + + FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + + execute_process( + COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_headers} + RESULT_VARIABLE rcgen_result + ) + + # If the first call succeeds it is very very likely that the rest will, too + if(${rcgen_result} EQUAL 0) + + execute_process( + COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_sources} + ) + + execute_process( + COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_includes} + ) + + execute_process( + COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} + ) + + set(NEPOMUK_RESOURCES_GENERATED true) + + else(${rcgen_result} EQUAL 0) + + message(STATUS "Failed to generate Nepomuk resource classes.") + + endif(${rcgen_result} EQUAL 0) + + endif(NOT RCGEN) endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) diff --git a/modules/Win32Macros.cmake b/modules/Win32Macros.cmake index 3b2df54b..e5a3655b 100644 --- a/modules/Win32Macros.cmake +++ b/modules/Win32Macros.cmake @@ -1,21 +1,24 @@ +# win32 macros # -# 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. + # Copyright (c) 2006-2007, Ralf Habacker # # Redistribution and use is allowed according to the terms of the BSD license. -# + if (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. - # MACRO (addExplorerWrapper _projectname) # write explorer wrappers get_filename_component(CMAKE_BIN_PATH ${CMAKE_COMMAND} PATH) diff --git a/modules/kde4_exec_via_sh.cmake b/modules/kde4_exec_via_sh.cmake index 30a837af..6b826ff0 100644 --- a/modules/kde4_exec_via_sh.cmake +++ b/modules/kde4_exec_via_sh.cmake @@ -1,4 +1,4 @@ -# + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. diff --git a/modules/kde4uic.cmake b/modules/kde4uic.cmake index 92841663..0e2a33c9 100644 --- a/modules/kde4uic.cmake +++ b/modules/kde4uic.cmake @@ -1,3 +1,4 @@ + # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. |