initial import

This commit is contained in:
Ivailo Monev 2014-11-13 01:04:59 +02:00
commit 814163a8dc
8882 changed files with 1472443 additions and 0 deletions

45
.commit-template Normal file
View file

@ -0,0 +1,45 @@
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# You MUST wrap all lines at 72 characters.
# Please see http://techbase.kde.org/Policies/Commit_Policy
#
# For Git commit hook keywords see:
# http://community.kde.org/Sysadmin/GitKdeOrgManual#Commit_hook_keywords
#
# ==[ Subject: One line ONLY short meaningful description for logs ]===|
# ==[ Blank: Follow the Subject with a blank line, do NOT remove ]=====|
# ==[ Details: Describe what changed and explain why it changed]=======|
# ==[ Fields: Uncomment and edit where applicable ]====================|
#
# --[ Close bug in bugs.kde.org as fixed ]-----------------------------|
#BUG: <bug number>
#FIXED-IN: <optional release version>
#
# --[ Add to release changelog optionally close wish in bugs.kde.org ]-|
#FEATURE: <optional bug number>
#FIXED-IN: <optional release version>
#
# --[ Copy commit message to a bug or wish in bugs.kde.org ]-----------|
#CCBUG: <bug number>
#
# --[ Copy commit message to an email address ]------------------------|
#CCMAIL: <email>
#
# --[ Close a review on git.reviewboard.kde.org as submitted ]---------|
#REVIEW: <review number>
#
# --[ Notify documentation team of user visible changes ]--------------|
#GUI:
#
# --[ Notify Commit Digest team of something interesting ]-------------|
#DIGEST:
#
# --[ Mark commit as silent for commit filter filtering. ]-------------|
# [ Use sparingly and only for uninteresting and ]
# [ uncontroversial commits. ]
#GIT_SILENT

14
.emacs-dirvars Normal file
View file

@ -0,0 +1,14 @@
;; -*- emacs-lisp -*-
;;
;; This file is processed by the dirvars emacs package. Each variable
;; setting below is performed when this dirvars file is loaded.
;;
indent-tabs-mode: nil
tab-width: 8
c-basic-offset: 4
evaluate: (c-set-offset 'innamespace '0)
kde-emacs-after-parent-string: ""
evaluate: (c-set-offset 'inline-open '0)
kdab-qt-version: 4
kdab-jump-project-name: kde
magic-parens-mode: nil

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
org*.xml eol=lf

70
.gitexcludes Executable file
View file

@ -0,0 +1,70 @@
# This file is a global file to ignore things that probably shouldn't
# be committed to git.
#
# Its contents overrides (well, appends to) the per-repo glob exclusions.
# NOTE: that this obviously prevents these files from bein displayed in git
# status, git add --all, etc. etc. Since that's the point of it; that way you
# won't end up accidentally committing useless files/dirs, and cluttering
# your output from 'git status' for example.
#
# Feel free to add on to it.
#
# In order to use this file, copy it to ~/.gitexcludes, and add the
# following to your "~/.gitconfig" file.
#
# [core]
# excludesfile = ~/.gitexcludes
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
# You can enable these (for most people's uses),
# but keep in mind test file for KTar/KZip would
# obviously need these.
#*.7z
#*.dmg
#*.gz
#*.iso
#*.jar
#*.rar
#*.tar
#*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# You can uncomment the ".directory" it if you don't care about e.g.:
#
# kde-baseapps/konqueror/sidebar/trees/init/remote/.directory
# kde-baseapps/konqueror/sidebar/trees/init/remote/web/.directory
# kde-baseapps/konqueror/sidebar/trees/init/remote/ftp/.directory
# kde-baseapps/konqueror/sidebar/trees/init/services/.directory
#
#*.directory
*.kdev4
*-swp
*.swp
/build

2
.krazy Normal file
View file

@ -0,0 +1,2 @@
#these subdirs don't have code, so ignore them
IGNORESUBS licenses,mimetypes

4
.reviewboardrc Normal file
View file

@ -0,0 +1,4 @@
REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
REPOSITORY = "git://anongit.kde.org/kdelibs"
BRANCH = "master"
TARGET_GROUPS = "kdelibs"

11
AUTHORS Normal file
View file

@ -0,0 +1,11 @@
Look in the appropriate subdirectories or files to get more information
about the authors.
The package is maintained by the KDE development team <kde-core-devel@kde.org>,
however numerous people, too many to count, have contributed to kdelibs as a
whole. If you have a specific question, dig up the appropriate mailing list
address, and ask away.
Konqueror/KHTML: kfm-devel@kde.org
Buildsystem Issues: kde-buildsystem@kde.org
General KDE Development: kde-core-devel@kde.org

403
CMakeLists.txt Normal file
View file

@ -0,0 +1,403 @@
project(kdelibs)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
# Make CPack available to easy generate binary packages
include(CPack)
################# set KDE specific information #################
set (KDE_VERSION_MAJOR 4)
set (KDE_VERSION_MINOR 14)
set (KDE_VERSION_RELEASE 3)
set (KDE_VERSION "${KDE_VERSION_MAJOR}.${KDE_VERSION_MINOR}.${KDE_VERSION_RELEASE}" )
set (KDE_VERSION_STRING "${KDE_VERSION}")
set (KDE_DISTRIBUTION_TEXT "compiled sources" CACHE STRING "Indicate the distribution in bug reports" )
# win32: give kde home in debug mode a different name as the release home dir because the settings and caches are different
if (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set (_KDE_DEFAULT_HOME_POSTFIX "-debug" CACHE STRING "default KDE home directory postfix" )
endif (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set (KDE_DEFAULT_HOME ".kde${_KDE_DEFAULT_HOME_POSTFIX}" CACHE STRING "The default KDE home directory" )
# this must be before FindKDE4Internal in order to preset the result of the visibility test, so that it will be skipped
option(KHTML_BUILD_TESTREGRESSION "Build KHTML's testregression. Note: this disables hidden visibility")
# Disable visibility if testregression is built, because the symbols are needed then
if (KHTML_BUILD_TESTREGRESSION)
set (__KDE_HAVE_GCC_VISIBILITY 0)
endif (KHTML_BUILD_TESTREGRESSION)
option(STATIC_LIBRARY "Build kdelibs as static libraries." FALSE)
################# write platform profile file which will be installed #################
include(CreateKDEPlatformProfile.cmake)
if(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED)
set(KDE_NO_DEPRECATED TRUE)
endif(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED)
############### Give the user the option to build the udisks2 solid backend instead of the udisks backend ###############
option(WITH_SOLID_UDISKS2 "Enable the udisks2 solid backend instead" "ON")
############### Give the user the option to build the deprecated WMI solid backend instead of the new win backend ###############
option(WITH_SOLID_WMI "Enables the deprecated WMI backend on Windows")
############### Load the CTest options ###############
# CTestCustom.cmake has to be in the CTEST_BINARY_DIR.
# in the KDE build system, this is the same as CMAKE_BINARY_DIR.
configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake COPYONLY)
################# now find all used packages #################
set (QT_MIN_VERSION "4.8.0")
find_package(KDE4Internal REQUIRED)
include(KDE4Defaults)
include (MacroLibrary)
if (APPLE)
find_package(Carbon REQUIRED)
endif (APPLE)
if(UNIX AND Q_WS_X11)
#X11 Session Management (SM) is required
#X11_SM_FOUND is set in FindX11, which is required by KDE4Internal
if(NOT X11_SM_FOUND)
message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
endif(NOT X11_SM_FOUND)
endif(UNIX AND Q_WS_X11)
#required features:
# Perl is used e.g. in khtml, kjs, kjsembed and others
find_package(Perl)
set_package_properties(Perl PROPERTIES URL "http://www.perl.org" TYPE REQUIRED PURPOSE "Needed for building kdelibs")
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams"
URL "http://www.zlib.net"
TYPE REQUIRED
PURPOSE "Required by the core KDE libraries and some critical kioslaves"
)
find_package(Strigi 0.6.3)
if (WIN32)
set (STRIGI_TYPE "OPTIONAL")
set (STRIGI_EXTRA_TEXT "")
else (WIN32)
set (STRIGI_TYPE "REQUIRED")
set (STRIGI_EXTRA_TEXT "Required by some critical kioslaves")
endif (WIN32)
set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support"
URL "http://strigi.sourceforge.net"
TYPE ${STRIGI_TYPE}
PURPOSE ${STRIGI_EXTRA_TEXT}
)
find_package(LibAttica 0.4.2)
set_package_properties(LibAttica PROPERTIES DESCRIPTION "Support for Get Hot New Stuff"
URL "https://projects.kde.org/attica"
TYPE REQUIRED
)
#optional features
if(X11_FOUND)
#X11_Xrender discovery is done by FindX11
add_feature_info("X Rendering Extension (libXrender)" X11_Xrender_FOUND "Support for compositing, rendering operations, and alpha-blending. STRONGLY RECOMMENDED")
macro_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER)
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC)
add_feature_info("X Screensaver Extension (libXss)" HAVE_XSCREENSAVER "Support for KIdleTime (fallback mode)")
add_feature_info("X Sync Extension (libXext)" HAVE_XSYNC "Efficient operation of KIdleTime. STRONGLY RECOMMENDED")
if(NOT HAVE_XSYNC AND NOT HAVE_XSCREENSAVER)
message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) development package was found.\nPlease install one of them (XSync is recommended)\n")
endif(NOT HAVE_XSYNC AND NOT HAVE_XSCREENSAVER)
endif(X11_FOUND)
macro_optional_find_package(OpenSSL)
set_package_properties(OpenSSL PROPERTIES DESCRIPTION "Support for secure network communications (SSL and TLS)"
URL "http://openssl.org"
TYPE RECOMMENDED
PURPOSE "KDE uses OpenSSL for the bulk of secure communications, including secure web browsing via HTTPS"
)
macro_optional_find_package(Libintl)
set_package_properties(Libintl PROPERTIES DESCRIPTION "Support for multiple languages"
URL "http://www.gnu.org/software/gettext"
TYPE RECOMMENDED
PURPOSE "Enables KDE to be available in many different languages"
)
macro_optional_find_package(Soprano 2.7.56 COMPONENTS PLUGIN_RAPTORPARSER PLUGIN_REDLANDBACKEND)
set_package_properties(Soprano PROPERTIES DESCRIPTION "Support for the Nepomuk semantic desktop system"
URL "http://soprano.sourceforge.net"
TYPE OPTIONAL
)
macro_optional_find_package(SharedDesktopOntologies 0.10)
set_package_properties(SharedDesktopOntologies PROPERTIES DESCRIPTION "Support for the Nepomuk semantic desktop system"
URL "http://oscaf.sourceforge.net"
TYPE OPTIONAL
)
macro_optional_find_package(QCA2 2.0.0)
set_package_properties(QCA2 PROPERTIES DESCRIPTION "Support for remote plasma widgets"
URL "http://delta.affinix.com/qca"
TYPE OPTIONAL
)
find_package(DBusMenuQt)
set_package_properties(DBusMenuQt PROPERTIES DESCRIPTION "Support for notification area menus via the DBusMenu protocol"
URL "https://launchpad.net/libdbusmenu-qt"
TYPE REQUIRED
)
################# Disallow in-source build #################
macro_ensure_out_of_source_build("kdelibs requires an out of source build. Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.")
# ... and warn in case of an earlier in-source build
set(generatedFileInSourceDir EXISTS ${kdelibs_SOURCE_DIR}/kdemacros.h OR EXISTS ${kdelibs_SOURCE_DIR}/config.h)
if(${generatedFileInSourceDir})
message(STATUS "kdemacros.h or config.h exists in your source directory.")
message(FATAL_ERROR "Please run svn-clean, it would seem that your source directory has generated files in it.")
endif(${generatedFileInSourceDir})
#########################################################################
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
remove_definitions(-DQT3_SUPPORT_WARNINGS -DQT3_SUPPORT)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
################# setup the include directories #################
# for including config.h and for includes like <kparts/foo.h>
include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces)
if(QCA2_FOUND)
include_directories(
${QCA2_INCLUDE_DIR}
)
endif(QCA2_FOUND)
# Those variables for are only valid inside of kdelibs, of course.
# Use the one variable for the lib you depend upon.
# E.g. kdeui uses ${KDE4_KDECORE_INCLUDES}. Something that depends on kparts uses ${KDE4_KPARTS_INCLUDES}.
set(KDE4_KJS_INCLUDES ${CMAKE_SOURCE_DIR}/kjs
${CMAKE_BINARY_DIR}/kjs)
if(NOT WINCE)
set(KDE4_KDECORE_INCLUDES ${KDE4_KJS_INCLUDES} )
endif(NOT WINCE)
# kdecore depends on Qt (need only headers from kjs)
set(KDE4_KDECORE_INCLUDES ${KDE4_KDECORE_INCLUDES}
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_BINARY_DIR}/kdecore
${CMAKE_SOURCE_DIR}/kdecore/compression
${CMAKE_SOURCE_DIR}/kdecore/config
${CMAKE_SOURCE_DIR}/kdecore/date
${CMAKE_SOURCE_DIR}/kdecore/io
${CMAKE_SOURCE_DIR}/kdecore/jobs
${CMAKE_SOURCE_DIR}/kdecore/kernel
${CMAKE_SOURCE_DIR}/kdecore/auth
${CMAKE_SOURCE_DIR}/kdecore/network
${CMAKE_SOURCE_DIR}/kdecore/services
${CMAKE_SOURCE_DIR}/kdecore/localization
${CMAKE_SOURCE_DIR}/kdecore/sycoca
${CMAKE_SOURCE_DIR}/kdecore/text
${CMAKE_SOURCE_DIR}/kdecore/util
${CMAKE_SOURCE_DIR}/kdecore/sonnet
${QT_INCLUDES}
${_KDE4_PLATFORM_INCLUDE_DIRS})
# kdeui depends on kdecore
set(KDE4_KDEUI_INCLUDES ${CMAKE_SOURCE_DIR}/kdeui
${CMAKE_SOURCE_DIR}/kdeui/actions
${CMAKE_SOURCE_DIR}/kdeui/colors
${CMAKE_SOURCE_DIR}/kdeui/config
${CMAKE_SOURCE_DIR}/kdeui/dialogs
${CMAKE_SOURCE_DIR}/kdeui/findreplace
${CMAKE_SOURCE_DIR}/kdeui/fonts
${CMAKE_SOURCE_DIR}/kdeui/icons
${CMAKE_SOURCE_DIR}/kdeui/itemviews
${CMAKE_SOURCE_DIR}/kdeui/jobs
${CMAKE_SOURCE_DIR}/kdeui/kernel
${CMAKE_SOURCE_DIR}/kdeui/notifications
${CMAKE_SOURCE_DIR}/kdeui/paged
${CMAKE_SOURCE_DIR}/kdeui/plotting
${CMAKE_SOURCE_DIR}/kdeui/shortcuts
${CMAKE_SOURCE_DIR}/kdeui/sonnet
${CMAKE_SOURCE_DIR}/kdeui/util
${CMAKE_SOURCE_DIR}/kdeui/widgets
${CMAKE_SOURCE_DIR}/kdeui/windowmanagement
${CMAKE_SOURCE_DIR}/kdeui/xmlgui
${KDE4_KDECORE_INCLUDES})
# kio depends on kdeui
set(KDE4_KIO_INCLUDES ${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/bookmarks
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/kio/kfile
${KDE4_KDEUI_INCLUDES})
# kpty
set(KDE4_KPTY_INCLUDES ${CMAKE_SOURCE_DIR}/kpty ${KDE4_KIO_INCLUDES} )
# kparts depends on kio
set(KDE4_KPARTS_INCLUDES ${CMAKE_SOURCE_DIR}/kparts
${KDE4_KIO_INCLUDES})
# kde3support depends on kparts
set(KDE4_KDE3SUPPORT_INCLUDES ${CMAKE_SOURCE_DIR}/kde3support
${CMAKE_SOURCE_DIR}/kde3support/kdecore
${CMAKE_SOURCE_DIR}/kde3support/kdeui
${CMAKE_SOURCE_DIR}/kde3support/kio
${KDE4_KPARTS_INCLUDES})
if(NOT WINCE)
set(KDE4_KHTML_INCLUDES ${CMAKE_SOURCE_DIR}/khtml)
endif(NOT WINCE)
################# configure checks and create the configured files #################
if(WINCE)
set(STATIC_LIBRARY ON)
add_definitions(-DSTATIC_INSTALL_PATH=L\\\"/programme/kde\\\")
endif(WINCE)
if(STATIC_LIBRARY)
set(LIBRARY_TYPE STATIC)
add_definitions(-DKDELIBS_STATIC_LIBS)
message(STATUS "Building kdelibs as static libraries")
else(STATIC_LIBRARY)
set(LIBRARY_TYPE SHARED)
endif(STATIC_LIBRARY)
if(NOT WIN32)
# ACL stuff (used in kio/ and kioslaves/)
macro_optional_find_package(ACL)
set_package_properties(ACL PROPERTIES DESCRIPTION "Support for manipulating access control lists"
URL "ftp://oss.sgi.com/projects/xfs/cmd_tars"
TYPE RECOMMENDED
PURPOSE "STRONGLY RECOMMENDED"
)
macro_bool_to_01(ACL_FOUND HAVE_LIBACL HAVE_POSIX_ACL)
endif()
configure_file(config-acl.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-acl.h )
include(ConfigureChecks.cmake)
# Actually nepomuk is not optional, without it other KDE modules don't build,
# so this must be fixed. Alex
if(Soprano_FOUND AND SHAREDDESKTOPONTOLOGIES_FOUND)
set(HAVE_NEPOMUK true)
include(SopranoAddOntology)
add_subdirectory(nepomuk)
endif(Soprano_FOUND AND SHAREDDESKTOPONTOLOGIES_FOUND)
# now create config headers
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
configure_file(config-prefix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-prefix.h )
configure_file(config-compiler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-compiler.h )
configure_file(config-pty.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-pty.h )
configure_file(config-nepomuk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nepomuk.h )
configure_file(kdemacros.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdemacros.h )
# these two calls here should go somewhere else, Alex
check_library_exists(nsl gethostbyname "" HAVE_NSL_LIBRARY)
check_library_exists(socket connect "" HAVE_SOCKET_LIBRARY)
################# list the subdirectories #################
add_subdirectory( cmake )
add_subdirectory( kdecore )
add_subdirectory( kdeui )
if (UNIX)
add_subdirectory( kpty )
add_subdirectory( kdesu )
endif (UNIX)
if(NOT WINCE)
add_subdirectory( kjs )
add_subdirectory( kjsembed )
endif(NOT WINCE)
add_subdirectory( kio )
add_subdirectory( solid )
add_subdirectory( kded )
if (QT_QT3SUPPORT_FOUND)
add_subdirectory( kde3support )
endif (QT_QT3SUPPORT_FOUND)
add_subdirectory( kfile )
add_subdirectory( kconf_update )
if(NOT WINCE)
add_subdirectory( kdoctools )
endif(NOT WINCE)
add_subdirectory( kioslave )
add_subdirectory( knewstuff )
add_subdirectory( kparts )
add_subdirectory( kutils )
add_subdirectory( licenses )
add_subdirectory( mimetypes )
add_subdirectory( kinit )
add_subdirectory( threadweaver )
add_subdirectory( sonnet )
if(NOT WINCE)
add_subdirectory( khtml )
endif(NOT WINCE)
add_subdirectory( interfaces )
#if ( NOT CMAKE_CROSSCOMPILING AND QT_QTDESIGNER_FOUND )
add_subdirectory( kdewidgets )
#endif ( NOT CMAKE_CROSSCOMPILING AND QT_QTDESIGNER_FOUND )
add_subdirectory( knotify )
if(NOT WINCE)
add_subdirectory( kimgio )
endif(NOT WINCE)
add_subdirectory( dnssd )
add_subdirectory( kross )
add_subdirectory( security )
if(NOT WINCE)
add_subdirectory( plasma )
endif(NOT WINCE)
add_subdirectory( kunitconversion )
add_subdirectory( kdewebkit )
add_subdirectory( includes )
add_subdirectory( experimental )
macro_optional_add_subdirectory( doc )
################# write dependency file which will be installed #################
# Used in configure_file() and install(EXPORT)
set(KDE4_TARGET_PREFIX KDE4__)
include(CreateKDELibsDependenciesFile.cmake)
################# install files #################
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kdemacros.h DESTINATION ${INCLUDE_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config-nepomuk.h DESTINATION ${INCLUDE_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake DESTINATION ${DATA_INSTALL_DIR}/cmake/modules)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/KDEPlatformProfile.cmake DESTINATION ${DATA_INSTALL_DIR}/cmake/modules)
# run a script before installing the exports files which deletes previously installed
# configuration specific export files KDELibs4(Library|Tools)Targets-<config>.cmake
# if the main exports file KDELibs4(Library|Tools)Targets.cmake has changed. This makes sure
# that this main file doesn't include older and different configuration specific exports files,
# which might have a different set of targets or targets with different names.
# The code for installing the exports files will soon go into a macro. Alex
install(CODE "set(EXPORT_FILES KDELibs4LibraryTargets.cmake KDELibs4ToolsTargets.cmake)"
CODE "set(EXPORT_INSTALL_DIR \"${DATA_INSTALL_DIR}/cmake/modules\")"
SCRIPT "${CMAKE_SOURCE_DIR}/cmake/modules/check_installed_exports_file.cmake" )
install( EXPORT kdelibsLibraryTargets DESTINATION ${DATA_INSTALL_DIR}/cmake/modules NAMESPACE ${KDE4_TARGET_PREFIX} FILE KDELibs4LibraryTargets.cmake )
install( EXPORT kdelibsToolsTargets DESTINATION ${DATA_INSTALL_DIR}/cmake/modules NAMESPACE ${KDE4_TARGET_PREFIX} FILE KDELibs4ToolsTargets.cmake )
# the following will be the correct locations once cmake has the improved FIND_PACKAGE()
# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake DESTINATION ${PLUGIN_INSTALL_DIR}/cmake RENAME KDE4Config.cmake)
feature_summary(WHAT ALL
INCLUDE_QUIET_PACKAGES
FATAL_ON_MISSING_REQUIRED_PACKAGES
)

30
CONFLICTS Normal file
View file

@ -0,0 +1,30 @@
List of remaining conflicts between kdelibs3 and kdelibs4
NONE!
List of solved conflicts:
bin/ktradertest -> kdebase/runtime/ktraderclient
Note that kdebase/runtime will be installed as well, so it can't conflict with kdelibs3 either.
bin/kde-menu -> user tool (debugging, scripts, GUI feedback after install) -> kdebase/runtime/kde-menu, as kde4-menu.
bin/kstartupconfig -> kdebase/workspace
bin/kdostartupconfig -> kdebase/workspace
bin/kded -> kded4 - DONE
bin/kcookiejar -> kcookiejar4 - DONE (not used by khtml anymore, only a command-line tool)
bin/kdesu_stub -> libexec - DONE
bin/kaddprinterwizard -> libexec - DONE (started by a kicker menuext; wrapper around libkdeprint functionality)
bin/kio_http_cache_cleaner -> libexec - DONE
bin/kdontchangethehostname -> libexec - DONE
bin/klauncher -> libexec - DONE
bin/kpac_dhcp_helper -> libexec - DONE
bin/ksendbugmail -> libexec - DONE
bin/kconf_update -> libexec - DONE (started by kded)
bin/cupsdoprint -> libexec - DONE
bin/ksvgtopng -> devel only, doesn't matter
bin/kunittestmodrunner -> devel only, and for compat so it can't be renamed/moved
bin/makekdewidgets -> devel only, doesn't matter
bin/kconfig_compiler -> devel only, doesn't matter
bin/preparetips -> devel only perhaps?

346
COPYING Normal file
View file

@ -0,0 +1,346 @@
NOTE! The GPL below is copyrighted by the Free Software Foundation, but
the instance of code that it refers to (the kde programs) are copyrighted
by the authors who actually wrote it.
---------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

397
COPYING.DOC Normal file
View file

@ -0,0 +1,397 @@
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

510
COPYING.LIB Normal file
View file

@ -0,0 +1,510 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

13
CTestConfig.cmake Normal file
View file

@ -0,0 +1,13 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(Dart)
set(CTEST_PROJECT_NAME "kdelibs")
set(CTEST_NIGHTLY_START_TIME "20:00:00 CET")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=kdelibs")
set(CTEST_DROP_SITE_CDASH TRUE)

14
CTestCustom.cmake Normal file
View file

@ -0,0 +1,14 @@
# This file contains all the specific settings that will be used
# when running 'make Experimental' or 'make ExperimentalBuild'
# Change the maximum warnings that will be displayed
# on the report page (default 50)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
set(CTEST_CUSTOM_WARNING_EXCEPTION "kdecore/network/k3socket[a-z]+\\.h"
"kdecore/network/k3clientsocketbase\\.h"
"Warning: No relevant classes found. No output generated." # moc didn't find anything to do
"yy" "YY" # ignore the warnings in generated code
)
set(CTEST_CUSTOM_ERROR_EXCEPTION "ICECC")
set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_")

266
ConfigureChecks.cmake Normal file
View file

@ -0,0 +1,266 @@
# NOTE: only add something here if it is really needed by all of kdelibs.
# Otherwise please prefer adding to the relevant config-foo.h.cmake file,
# and the CMakeLists.txt that generates it (or a separate ConfigureChecks.make file if you prefer)
# to minimize recompilations and increase modularity.
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckSymbolExists)
include(CheckCXXSymbolExists)
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckPrototypeExists)
include(CheckTypeSize)
include(CheckStructMember)
include(CheckCXXSourceCompiles)
# The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with
# definitions like _GNU_SOURCE that are needed on each platform.
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
set( KDELIBSUFF ${LIB_SUFFIX} )
macro_bool_to_01(LIBINTL_FOUND ENABLE_NLS) # kdecore, khtml, kjs
# FIXME: Make this changeable!
# khtml svg support
set(SVG_SUPPORT 1) # unused yet, but for the future
# now check for dlfcn.h using the cmake supplied CHECK_INCLUDE_FILES() macro
# If definitions like -D_GNU_SOURCE are needed for these checks they
# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
# defined outside this file. Here we include these definitions in
# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
# checks below.
set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
check_include_files(stdio.h HAVE_STDIO_H) # various
check_include_files(stdlib.h HAVE_STDLIB_H) # various
check_include_files(string.h HAVE_STRING_H) # various
check_include_files(strings.h HAVE_STRINGS_H) # various
check_include_files(malloc.h HAVE_MALLOC_H) # khtml
check_include_files(sys/time.h TIME_WITH_SYS_TIME) # kdecore, kioslave
check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H) # kinit, config.h
check_include_files(alloca.h HAVE_ALLOCA_H) # kdecore, khtml
check_include_files(fstab.h HAVE_FSTAB_H) # kio, kdecore
check_include_files(limits.h HAVE_LIMITS_H) # various
check_include_files(mntent.h HAVE_MNTENT_H) # solid, kio, kdecore
check_include_files(sysent.h HAVE_SYSENT_H) # kdecore
check_include_files(sys/stat.h HAVE_SYS_STAT_H) # various
check_include_files(sys/ucred.h HAVE_SYS_UCRED_H) # kio
check_include_files(sys/types.h HAVE_SYS_TYPES_H) # various
check_include_files(sys/select.h HAVE_SYS_SELECT_H) # various
check_include_files(sys/param.h HAVE_SYS_PARAM_H) # various
check_include_files("stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H) # kio, kdecore
check_include_files(sys/mntent.h HAVE_SYS_MNTENT_H) # solid, kio, kdecore
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H) # kio, kdecore
check_include_files(unistd.h HAVE_UNISTD_H) # various
check_include_files(stdint.h HAVE_STDINT_H) # various
check_include_files(paths.h HAVE_PATHS_H) # kdecore, kio
check_include_files(errno.h HAVE_ERRNO_H) # kjs, errno.h is used in many places, but only guarded in kjs/
check_include_files(sys/time.h HAVE_SYS_TIME_H) # various
check_include_files(valgrind/memcheck.h HAVE_VALGRIND_MEMCHECK_H) # khtml
check_include_files(crtdbg.h HAVE_CRTDBG_H) # kjs
check_include_files(langinfo.h HAVE_LANGINFO_H) # kdecore
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # kdecore
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # kdeui
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # kdeui
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kio
# Use check_symbol_exists to check for symbols in a reliable
# cross-platform manner. It accounts for different calling
# conventions and the possibility that the symbol is defined as a
# macro. Note that some symbols require multiple includes in a
# specific order. Refer to the man page for each symbol for which a
# check is to be added to get the proper set of headers.
check_symbol_exists(strcmp "string.h" HAVE_STRCMP) # libltdl
check_symbol_exists(strrchr "string.h" HAVE_STRRCHR) # libltdl
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL) # kioslave
check_symbol_exists(S_ISSOCK "sys/stat.h" HAVE_S_ISSOCK) # config.h
check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF) # config.h
check_symbol_exists(posix_madvise "sys/mman.h" HAVE_MADVISE) # kdecore, kdeui
check_symbol_exists(getgrouplist "unistd.h;grp.h" HAVE_GETGROUPLIST)# kdecore/fakes.c
check_function_exists(backtrace HAVE_BACKTRACE) # kdecore, kio
check_function_exists(getpagesize HAVE_GETPAGESIZE) # khtml
# This is broken on OSX 10.6 (succeeds but shouldn't do) and doesn't exist
# on previous versions so don't do the check on APPLE.
if(NOT APPLE)
check_function_exists(fdatasync HAVE_FDATASYNC) # kdecore, kate
endif(NOT APPLE)
check_function_exists(mmap HAVE_MMAP) # kdecore, khtml
check_function_exists(sendfile HAVE_SENDFILE) # kioslave
check_function_exists(srandom HAVE_SRANDOM) # config.h
check_function_exists(_NSGetEnviron HAVE_NSGETENVIRON) # kinit, config.h
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) # testkjs
check_function_exists(getgrouplist HAVE_GETGROUPLIST) # kio
check_library_exists(volmgt volmgt_running "" HAVE_VOLMGT) # various
# Check for libresolv
# e.g. on slackware 9.1 res_init() is only a define for __res_init, so we check both, Alex
set(HAVE_RESOLV_LIBRARY FALSE) # kdecore, kdecore/network, kpac
check_library_exists(resolv res_init "" HAVE_RES_INIT_IN_RESOLV_LIBRARY)
check_library_exists(resolv __res_init "" HAVE___RES_INIT_IN_RESOLV_LIBRARY)
if (HAVE___RES_INIT_IN_RESOLV_LIBRARY OR HAVE_RES_INIT_IN_RESOLV_LIBRARY)
set(HAVE_RESOLV_LIBRARY TRUE)
endif (HAVE___RES_INIT_IN_RESOLV_LIBRARY OR HAVE_RES_INIT_IN_RESOLV_LIBRARY)
if (UNIX)
# for kdecore (kpty) & kdesu
check_include_files("sys/types.h;libutil.h" HAVE_LIBUTIL_H)
check_include_files(util.h HAVE_UTIL_H)
check_include_files(termios.h HAVE_TERMIOS_H)
check_include_files(termio.h HAVE_TERMIO_H)
check_include_files(pty.h HAVE_PTY_H)
check_include_files(sys/stropts.h HAVE_SYS_STROPTS_H)
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
set(UTIL_LIBRARY)
check_library_exists(utempter addToUtmp "" HAVE_ADDTOUTEMP)
check_include_files(utempter.h HAVE_UTEMPTER_H)
if (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
set(HAVE_UTEMPTER 1)
set(UTEMPTER_LIBRARY utempter)
else (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
check_function_exists(login login_in_libc)
if (NOT login_in_libc)
check_library_exists(util login "" login_in_libutil)
if (login_in_libutil)
set(UTIL_LIBRARY util)
endif (login_in_libutil)
endif (NOT login_in_libc)
if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin OR CMAKE_SYSTEM_NAME MATCHES GNU/FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL GNU)
set (HAVE_UTMPX)
else (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin OR CMAKE_SYSTEM_NAME MATCHES GNU/FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL GNU)
check_function_exists(getutxent HAVE_UTMPX)
endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin OR CMAKE_SYSTEM_NAME MATCHES GNU/FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL GNU)
if (HAVE_UTMPX)
set(utmp utmpx)
if (login_in_libutil)
check_library_exists(util loginx "" HAVE_LOGINX)
endif (login_in_libutil)
else (HAVE_UTMPX)
set(utmp utmp)
endif (HAVE_UTMPX)
if (login_in_libc OR login_in_libutil)
set(HAVE_LOGIN 1)
else (login_in_libc OR login_in_libutil)
set(HAVE_LOGIN)
check_struct_member("struct ${utmp}" "ut_type" "${utmp}.h" HAVE_STRUCT_UTMP_UT_TYPE)
check_struct_member("struct ${utmp}" "ut_pid" "${utmp}.h" HAVE_STRUCT_UTMP_UT_PID)
check_struct_member("struct ${utmp}" "ut_session" "${utmp}.h" HAVE_STRUCT_UTMP_UT_SESSION)
endif (login_in_libc OR login_in_libutil)
check_struct_member("struct ${utmp}" "ut_syslen" "${utmp}.h" HAVE_STRUCT_UTMP_UT_SYSLEN)
check_struct_member("struct ${utmp}" "ut_id" "${utmp}.h" HAVE_STRUCT_UTMP_UT_ID)
endif (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
check_function_exists(openpty openpty_in_libc)
if (NOT openpty_in_libc)
check_library_exists(util openpty "" openpty_in_libutil)
if (openpty_in_libutil)
set(UTIL_LIBRARY util)
endif (openpty_in_libutil)
endif (NOT openpty_in_libc)
if (openpty_in_libc OR openpty_in_libutil)
set(HAVE_OPENPTY 1)
else (openpty_in_libc OR openpty_in_libutil)
set(HAVE_OPENPTY)
execute_process(
COMMAND sh -c "
for ptm in ptc ptmx ptm ptym/clone; do
if test -c /dev/$ptm; then
echo /dev/$ptm
break
fi
done"
OUTPUT_VARIABLE PTM_DEVICE
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "PTY multiplexer: ${PTM_DEVICE}")
check_function_exists(revoke HAVE_REVOKE)
check_function_exists(_getpty HAVE__GETPTY)
check_function_exists(getpt HAVE_GETPT)
check_function_exists(grantpt HAVE_GRANTPT)
check_function_exists(unlockpt HAVE_UNLOCKPT)
check_function_exists(posix_openpt HAVE_POSIX_OPENPT)
endif (openpty_in_libc OR openpty_in_libutil)
check_function_exists(ptsname HAVE_PTSNAME)
endif (UNIX)
# it seems this isn't used anywhere
#find_library(ICE_LIB NAMES ICE PATHS /usr/X11/lib)
#check_library_exists(${ICE_LIB} _IceTransNoListen "" HAVE__ICETRANSNOLISTEN)
#set(CMAKE_REQUIRED_LIBRARIES crypt)
#check_function_exists(crypt "" HAVE_CRYPT)
#set(CMAKE_REQUIRED_LIBRARIES)
check_function_exists(getmntinfo HAVE_GETMNTINFO) # kdecore, kio
check_function_exists(initgroups HAVE_INITGROUPS) # kde3support/k3process, kdesu
check_function_exists(mkstemps HAVE_MKSTEMPS) # dcop, kdecore/fakes.c
check_function_exists(mkstemp HAVE_MKSTEMP) # kdecore/fakes.c
check_function_exists(mkdtemp HAVE_MKDTEMP) # kdecore/fakes.c
check_function_exists(random HAVE_RANDOM) # kdecore/fakes.c
check_function_exists(strlcpy HAVE_STRLCPY) # kdecore/fakes.c
check_function_exists(strlcat HAVE_STRLCAT) # kdecore/fakes.c
check_cxx_symbol_exists(__CORRECT_ISO_CPP_STRING_H_PROTO "string.h" HAVE_STRCASESTR_OVERLOAD) # glibc-2.9 strangeness
if (HAVE_STRCASESTR_OVERLOAD)
#message(STATUS "string.h defines __CORRECT_ISO_CPP_STRING_H_PROTO")
set(HAVE_STRCASESTR 1)
set(HAVE_STRCASESTR_PROTO 1)
else()
check_function_exists(strcasestr HAVE_STRCASESTR) # kdecore/fakes.c
check_prototype_exists(strcasestr string.h HAVE_STRCASESTR_PROTO)
endif()
check_function_exists(setenv HAVE_SETENV) # kdecore/fakes.c
check_function_exists(seteuid HAVE_SETEUID) # kdecore/fakes.c
check_function_exists(setmntent HAVE_SETMNTENT) # solid, kio, kdecore
check_function_exists(unsetenv HAVE_UNSETENV) # kdecore/fakes.c
check_function_exists(usleep HAVE_USLEEP) # kdecore/fakes.c, kdeui/qxembed
# check for prototypes [for functions provided by kdefakes when not available]
check_prototype_exists(mkstemps "stdlib.h;unistd.h" HAVE_MKSTEMPS_PROTO)
check_prototype_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP_PROTO)
check_prototype_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP_PROTO)
check_prototype_exists(strlcat string.h HAVE_STRLCAT_PROTO)
check_prototype_exists(strlcpy string.h HAVE_STRLCPY_PROTO)
check_prototype_exists(random stdlib.h HAVE_RANDOM_PROTO)
check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
check_prototype_exists(setenv stdlib.h HAVE_SETENV_PROTO)
check_prototype_exists(srandom stdlib.h HAVE_SRANDOM_PROTO)
check_prototype_exists(unsetenv stdlib.h HAVE_UNSETENV_PROTO)
check_prototype_exists(usleep unistd.h HAVE_USLEEP_PROTO)
check_prototype_exists(initgroups "unistd.h;sys/types.h;unistd.h;grp.h" HAVE_INITGROUPS_PROTO)
check_prototype_exists(setreuid unistd.h HAVE_SETREUID_PROTO)
check_prototype_exists(trunc math.h HAVE_TRUNC)
# check for existing datatypes
check_cxx_source_compiles("
#include <sys/types.h>
#include <sys/statvfs.h>
int main(){
struct statvfs *mntbufp;
int flags;
return getmntinfo(&mntbufp, flags);
}
" GETMNTINFO_USES_STATVFS )
check_struct_member(dirent d_type dirent.h HAVE_DIRENT_D_TYPE) # kdecore, kioslave/file
# TODO: for the more capable cmake authors: we need at least gcc's and MSVC's version in here
set (KDE_COMPILER_VERSION ${CMAKE_C_COMPILER})
string(REGEX REPLACE ^.*/ "" KDE_COMPILER_VERSION ${KDE_COMPILER_VERSION})

View file

@ -0,0 +1,127 @@
# this file is included by kdelibs/CMakeLists.txt and contains the cmake code
# which creates the KDELibsDepencies.cmake file, which is installed by kdelibs
######## write dependency file which will be installed #########
# write versions
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake
"# this file was generated during the kdelibs build process
set(KDE_VERSION_MAJOR ${KDE_VERSION_MAJOR})
set(KDE_VERSION_MINOR ${KDE_VERSION_MINOR})
set(KDE_VERSION_RELEASE ${KDE_VERSION_RELEASE})
set(KDE_VERSION \"${KDE_VERSION}\")
set(KDE_VERSION_STRING \"${KDE_VERSION_STRING}\")
set(KDE_DEFAULT_HOME \"${KDE_DEFAULT_HOME}\")
")
# write installdirs
# we need the absolute directories where stuff will be installed too
# but since the variables which contain the destinations can be relative
# or absolute paths, we need this macro to make them all absolute, Alex
macro(MAKE_INSTALL_PATH_ABSOLUTE out in)
if (IS_ABSOLUTE "${in}") # IS_ABSOLUTE is new since cmake 2.4.8
set(${out} "${in}")
else (IS_ABSOLUTE "${in}")
set(${out} "\${KDE4_INSTALL_DIR}/${in}")
endif (IS_ABSOLUTE "${in}")
endmacro(MAKE_INSTALL_PATH_ABSOLUTE out in)
set(KDE4_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
make_install_path_absolute(KDE4_LIB_INSTALL_DIR ${LIB_INSTALL_DIR})
make_install_path_absolute(KDE4_IMPORTS_INSTALL_DIR ${IMPORTS_INSTALL_DIR})
make_install_path_absolute(KDE4_LIBEXEC_INSTALL_DIR ${LIBEXEC_INSTALL_DIR})
make_install_path_absolute(KDE4_INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR})
make_install_path_absolute(KDE4_BIN_INSTALL_DIR ${BIN_INSTALL_DIR})
make_install_path_absolute(KDE4_SBIN_INSTALL_DIR ${SBIN_INSTALL_DIR})
make_install_path_absolute(KDE4_DATA_INSTALL_DIR ${DATA_INSTALL_DIR})
make_install_path_absolute(KDE4_HTML_INSTALL_DIR ${HTML_INSTALL_DIR})
make_install_path_absolute(KDE4_CONFIG_INSTALL_DIR ${CONFIG_INSTALL_DIR})
make_install_path_absolute(KDE4_ICON_INSTALL_DIR ${ICON_INSTALL_DIR})
make_install_path_absolute(KDE4_KCFG_INSTALL_DIR ${KCFG_INSTALL_DIR})
make_install_path_absolute(KDE4_LOCALE_INSTALL_DIR ${LOCALE_INSTALL_DIR})
make_install_path_absolute(KDE4_MIME_INSTALL_DIR ${MIME_INSTALL_DIR})
make_install_path_absolute(KDE4_SOUND_INSTALL_DIR ${SOUND_INSTALL_DIR})
make_install_path_absolute(KDE4_TEMPLATES_INSTALL_DIR ${TEMPLATES_INSTALL_DIR})
make_install_path_absolute(KDE4_WALLPAPER_INSTALL_DIR ${WALLPAPER_INSTALL_DIR})
make_install_path_absolute(KDE4_KCONF_UPDATE_INSTALL_DIR ${KCONF_UPDATE_INSTALL_DIR})
make_install_path_absolute(KDE4_AUTOSTART_INSTALL_DIR ${AUTOSTART_INSTALL_DIR})
make_install_path_absolute(KDE4_XDG_APPS_INSTALL_DIR ${XDG_APPS_INSTALL_DIR})
make_install_path_absolute(KDE4_XDG_DIRECTORY_INSTALL_DIR ${XDG_DIRECTORY_INSTALL_DIR})
make_install_path_absolute(KDE4_SYSCONF_INSTALL_DIR ${SYSCONF_INSTALL_DIR})
make_install_path_absolute(KDE4_MAN_INSTALL_DIR ${MAN_INSTALL_DIR})
make_install_path_absolute(KDE4_INFO_INSTALL_DIR ${INFO_INSTALL_DIR})
make_install_path_absolute(KDE4_DBUS_INTERFACES_DIR ${DBUS_INTERFACES_INSTALL_DIR})
make_install_path_absolute(KDE4_DBUS_SERVICES_DIR ${DBUS_SERVICES_INSTALL_DIR})
make_install_path_absolute(KDE4_SERVICES_INSTALL_DIR ${SERVICES_INSTALL_DIR})
make_install_path_absolute(KDE4_SERVICETYPES_INSTALL_DIR ${SERVICETYPES_INSTALL_DIR})
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake "
if (NOT KDE4_INSTALL_DIR)
set(KDE4_INSTALL_DIR \"${CMAKE_INSTALL_PREFIX}\")
endif (NOT KDE4_INSTALL_DIR)
set(KDE4_LIB_INSTALL_DIR \"${KDE4_LIB_INSTALL_DIR}\")
set(KDE4_IMPORTS_INSTALL_DIR \"${KDE4_IMPORTS_INSTALL_DIR}\")
set(KDE4_LIBEXEC_INSTALL_DIR \"${KDE4_LIBEXEC_INSTALL_DIR}\")
set(KDE4_INCLUDE_INSTALL_DIR \"${KDE4_INCLUDE_INSTALL_DIR}\")
set(KDE4_BIN_INSTALL_DIR \"${KDE4_BIN_INSTALL_DIR}\")
set(KDE4_SBIN_INSTALL_DIR \"${KDE4_SBIN_INSTALL_DIR}\")
set(KDE4_DATA_INSTALL_DIR \"${KDE4_DATA_INSTALL_DIR}\")
set(KDE4_HTML_INSTALL_DIR \"${KDE4_HTML_INSTALL_DIR}\")
set(KDE4_CONFIG_INSTALL_DIR \"${KDE4_CONFIG_INSTALL_DIR}\")
set(KDE4_ICON_INSTALL_DIR \"${KDE4_ICON_INSTALL_DIR}\")
set(KDE4_KCFG_INSTALL_DIR \"${KDE4_KCFG_INSTALL_DIR}\")
set(KDE4_LOCALE_INSTALL_DIR \"${KDE4_LOCALE_INSTALL_DIR}\")
set(KDE4_MIME_INSTALL_DIR \"${KDE4_MIME_INSTALL_DIR}\")
set(KDE4_SOUND_INSTALL_DIR \"${KDE4_SOUND_INSTALL_DIR}\")
set(KDE4_TEMPLATES_INSTALL_DIR \"${KDE4_TEMPLATES_INSTALL_DIR}\")
set(KDE4_WALLPAPER_INSTALL_DIR \"${KDE4_WALLPAPER_INSTALL_DIR}\")
set(KDE4_KCONF_UPDATE_INSTALL_DIR \"${KDE4_KCONF_UPDATE_INSTALL_DIR}\")
set(KDE4_AUTOSTART_INSTALL_DIR \"${KDE4_AUTOSTART_INSTALL_DIR}\")
set(KDE4_XDG_APPS_INSTALL_DIR \"${KDE4_XDG_APPS_INSTALL_DIR}\")
set(KDE4_XDG_DIRECTORY_INSTALL_DIR \"${KDE4_XDG_DIRECTORY_INSTALL_DIR}\")
set(KDE4_SYSCONF_INSTALL_DIR \"${KDE4_SYSCONF_INSTALL_DIR}\")
set(KDE4_MAN_INSTALL_DIR \"${KDE4_MAN_INSTALL_DIR}\")
set(KDE4_INFO_INSTALL_DIR \"${KDE4_INFO_INSTALL_DIR}\")
set(KDE4_DBUS_INTERFACES_DIR \"${KDE4_DBUS_INTERFACES_DIR}\")
set(KDE4_DBUS_SERVICES_DIR \"${KDE4_DBUS_SERVICES_DIR}\")
set(KDE4_SERVICES_INSTALL_DIR \"${KDE4_SERVICES_INSTALL_DIR}\")
set(KDE4_SERVICETYPES_INSTALL_DIR \"${KDE4_SERVICETYPES_INSTALL_DIR}\")
set(KDE4_TARGET_PREFIX ${KDE4_TARGET_PREFIX} )
")
# write library dependencies
if (WIN32)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake"
"if (NOT QT_INSTALL_DIR)
set (QT_INSTALL_DIR \"${QT_INSTALL_DIR}\")
endif (NOT QT_INSTALL_DIR)
")
# replace hard coded paths by variables
# !!! the following stuff does not work because export_library_dependencies
# !!! does not wait until the file is written completely
# export_library_dependencies(${CMAKE_BINARY_DIR}/tmpdeps.cmake)
# file(READ ${CMAKE_BINARY_DIR}/tmpdeps.cmake _deps)
# string(REPLACE "${QT_INSTALL_DIR}" "\${QT_INSTALL_DIR}" __deps "${_deps}")
# file (APPEND ${CMAKE_BINARY_DIR}/KDELibsDependencies.cmake "${__deps}")
endif(WIN32)
# This variable defines whether KPty::login/logout have been built with
# utempter support so that they don't require special user permissions
# in order to work properly. Used by kwrited.
macro_bool_to_01(HAVE_UTEMPTER KDE4_KPTY_BUILT_WITH_UTEMPTER)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake" "set(KDE4_KPTY_BUILT_WITH_UTEMPTER ${KDE4_KPTY_BUILT_WITH_UTEMPTER})")
# Append stuff needed by the KAuth framework
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake" "
set(KDE4_AUTH_BACKEND_NAME \"${KDE4_AUTH_BACKEND_NAME}\")
set(KDE4_AUTH_HELPER_BACKEND_NAME \"${KDE4_AUTH_HELPER_BACKEND_NAME}\")
set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR \"${KDE4_AUTH_POLICY_FILES_INSTALL_DIR}\" CACHE STRING \"The location where policy files generated by KAuth will be installed, if the installed backend needs to\")
")

View file

@ -0,0 +1,45 @@
# this file is included by kdelibs/CMakeLists.txt and contains the cmake code
# which creates the KDEPlatformProfile.cmake file, which is installed by kdelibs
######## write profile file which will be installed #########
# Desktop profile (default profile)
if (KDE_PLATFORM_PROFILE STREQUAL "Desktop" OR NOT KDE_PLATFORM_PROFILE)
set(KDE_PLATFORM_PROFILE "Desktop")
set(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION FALSE)
set(KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION FALSE)
set(KDE_PLATFORM_FEATURE_KIO_INPROCESS FALSE)
set(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED FALSE)
endif (KDE_PLATFORM_PROFILE STREQUAL "Desktop" OR NOT KDE_PLATFORM_PROFILE)
# Tablet profile
if (KDE_PLATFORM_PROFILE STREQUAL "Tablet")
set(KDE_PLATFORM_PROFILE "Tablet")
set(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION TRUE)
set(KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION FALSE)
set(KDE_PLATFORM_FEATURE_KIO_INPROCESS FALSE)
set(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED FALSE)
message(STATUS "KDE Platform Profile: TABLET")
endif (KDE_PLATFORM_PROFILE STREQUAL "Tablet")
# Mobile profile
if (KDE_PLATFORM_PROFILE STREQUAL "Mobile")
set(KDE_PLATFORM_PROFILE "Mobile")
set(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION TRUE)
set(KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION TRUE)
set(KDE_PLATFORM_FEATURE_KIO_INPROCESS TRUE)
set(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED TRUE)
message(STATUS "KDE Platform Profile: MOBILE. Please be aware that this version of the KDE platform is BINARY INCOMPATIBLE to standard KDE. At this time no binary compatibility is guaranteed even within the mobile target.")
endif (KDE_PLATFORM_PROFILE STREQUAL "Mobile")
# Writing the profile file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/KDEPlatformProfile.cmake
"# this file was generated during the kdelibs build process
set(KDE_PLATFORM_PROFILE \"${KDE_PLATFORM_PROFILE}\")
set(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION ${KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION})
set(KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION ${KDE_PLATFORM_FEATURE_BINARY_INCOMPATIBLE_FEATURE_REDUCTION})
set(KDE_PLATFORM_FEATURE_KIO_INPROCESS ${KDE_PLATFORM_FEATURE_KIO_INPROCESS})
set(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED ${KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED})
")

163
DEBUG Normal file
View file

@ -0,0 +1,163 @@
Introduction
============
This is a short tutorial on debugging KDE applications. Throughout this
tutorial I will use "kedit" as example application.
Configuring for debugging
=========================
You can use -DCMAKE_BUILD_TYPE=Debug with the configure script, if you want to have
debug code in your KDE libs. If you have the space and can stand code that's
somewhat slower, this is worth it. The extra information really
helps debugging and thus bugfixing.
On the other hand, -DCMAKE_BUILD_TYPE=None removes all debug messages, leading
to a faster and cleaner desktop.
Debugging with GDB
==================
The recommended version of gdb to use is version 4.95 or higher, older
versions have problems generating proper backtraces.
There are three ways to debug an application with gdb:
1) You can start the application from within gdb.
2) You can attach gdb to an already running application.
3) You can run gdb after an application has crashed using a core file.
Starting applications from within gdb
=====================================
To start an application with gdb you can start gdb as follows:
> gdb kedit
GNU gdb 4.95.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb)
You can now set the command line arguments that you want to pass to kedit with
the gdb command "set args":
(gdb) set args myfile.txt
(gdb)
gdb has loaded the kedit executable on startup but it hasn't loaded any of
the libraries yet. This means that you can set any breakpoints in the
libraries yet. The easiest way to do that is to set a breakpoint in the
first line of main and then start the program:
(gdb) break main
Breakpoint 1 at 0x8048741: file /d/kde/build/4/kdeutils/kedit/kedit_dummy.cpp, line 3
(gdb) run
Starting program: /opt/kde/bin/kedit myfile.txt
Breakpoint 1, main (argc=1, argv=0xbfa798b4) at /d/kde/build/4/kdeutils/kedit/kedit_dummy.cpp:3
3 int main(int argc, char* argv[]) { return kdemain(argc,argv); }
(gdb)
You can now set breakpoints everywhere. For example lets set a breakpoint
in the KApplication constructor. Remember to use quotes before C++ method names:
(gdb) break 'KApplication::init()'
Breakpoint 2 at 0xb7a5f86d: file /d/kde/src/4/kdelibs/kdeui/kernel/kapplication.cpp, line 488.
(gdb)
We can now continue the execution of kedit. Execution will stop when it hits
a breakpoint of when the program exits. In this case execution will stop
in the first line of the KApplication constructor:
(gdb) continue
Continuing.
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
Breakpoint 2, KApplication::init (this=0xbfa797b4) at /d/kde/src/4/kdelibs/kdeui/kernel/kapplication.cpp:488
488 if ((getuid() != geteuid()) ||
Attaching gdb to already running applications
=============================================
Sometimes it is not practical to start an application from within gdb.
E.g. in those cases where you didn't know the application was about to
crash :-) When you get the friendly DrKonqi dialog informing you about
a crash you are just in time to start your debugger.
First lets attach gdb to an application that hasn't crashed (yet).
You start with finding the process of the application with e.g. "ps -aux":
> ps -aux | grep kedit
bastian 21570 15.1 6.8 13740 8800 pts/6 S 15:34 0:01 kedit
bastian 21582 0.0 0.3 1132 412 pts/6 R 15:34 0:00 grep kedit
From this you learn that kedit has process id 21570. Now you can start gdb as
follows:
> gdb kedit 21570
GNU gdb 4.95.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
/home1/bastian/21570: No such file or directory.
Attaching to program: /opt/kde/bin/kedit, Pid 21570
Reading symbols from /opt/kde/lib/kedit.so.0...done.
Loaded symbols for /opt/kde/lib/kedit.so.0
....
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
0x40c3d88e in __select () from /lib/libc.so.6
(gdb)
You will usually end up in the middle of a select() call from the event-loop.
This is the place where a KDE application spends most of its time, waiting
for things to happen.
A backtrace will typically look something like this:
(gdb) bt
#0 0x40c3d88e in __select () from /lib/libc.so.6
#1 0x40a22844 in __DTOR_END__ () at fam.c++:356
#2 0x407293bf in QApplication::enter_loop (this=0xbffff6e8)
at kernel/qapplication.cpp:2552
#3 0x406b1d7b in QApplication::exec (this=0xbffff6e8)
at kernel/qapplication_x11.cpp:2217
#4 0x4002d500 in main (argc=1, argv=0xbffff854) at kedit.cpp:1662
#5 0x40bbba5e in __libc_start_main (main=0x8048568 <main>, argc=1,
argv=0xbffff854, init=0x8048514 <_init>, fini=0x80486cc <_fini>,
rtld_fini=0x4000aa20 <_dl_fini>, stack_end=0xbffff84c)
at ../sysdeps/generic/libc-start.c:92
(gdb)
Getting core dumps
==================
If you want to have a core dump after your application crashes you need to
do two things:
1) Disable the KDE crash handler. This can be done either by using the
--nocrashhandler command line option or by setting the KDE_DEBUG environment
variable to some value e.g. KDE_DEBUG=true.
2) Enable core dump generation by changing the so called 'ulimits' with the
following command:
ulimit -c unlimited

3
INSTALL Normal file
View file

@ -0,0 +1,3 @@
Build instructions can be found at
http://techbase.kde.org/Getting_Started/Build/KDE4

3084
KDE4PORTING.html Normal file

File diff suppressed because it is too large Load diff

93
KDELibsNightly.cmake Normal file
View file

@ -0,0 +1,93 @@
# This is a script for running a Nightly build of kdelibs.
# It is ready for testing.
# To adapt it for other projects, basically only the KDE_CTEST_VCS_REPOSITORY variable
# has to be changed.
#
# It uses the file KDECTestNightly.cmake, which is in KDE svn in kdesdk/cmake/modules/.
# You need to have this file on some location on your system and then point the environment variable
# KDECTESTNIGHTLY_DIR to the directory containing this file when running this script.
#
# At the bottom of this file you can find (commented out) a simple shell script which
# I use to drive the Nightly builds on my machine. You have to adapt this to the
# conditions on your system, then you can run it e.g. via cron.
#
# Alex <neundorf AT kde.org>
# The VCS of KDE is "svn", also specify the repository
set(KDE_CTEST_VCS svn)
set(KDE_CTEST_VCS_REPOSITORY https://svn.kde.org/home/kde/trunk/KDE/kdelibs)
# for now hardcode the generator to "Unix Makefiles"
set(CTEST_CMAKE_GENERATOR "Unix Makefiles" )
# generic support code, provides the kde_ctest_setup() macro, which sets up everything required:
file(TO_CMAKE_PATH $ENV{KDECTESTNIGHTLY_DIR} KDECTESTNIGHTLY_DIR)
include( "${KDECTESTNIGHTLY_DIR}/KDECTestNightly.cmake" OPTIONAL RESULT_VARIABLE fileIncluded)
if(NOT fileIncluded)
message(FATAL_ERROR "Did not find file ${KDECTESTNIGHTLY_DIR}/KDECTestNightly.cmake . Set the environment variable KDECTESTNIGHTLY_DIR to the directory where this file is located. In KDE svn it is in kdesdk/cmake/modules/ ")
endif(NOT fileIncluded)
# set up binary dir, source dir, etc.
kde_ctest_setup("${CMAKE_CURRENT_LIST_FILE}")
# now actually do the Nightly
ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
ctest_start(Nightly)
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" )
# read some settings
include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
include("${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake" OPTIONAL)
# build the tests
set(KDE4_BUILD_TESTS TRUE)
# if CMAKE_INSTALL_PREFIX and BUILD_experimental were defined on the command line, put them
# in the initial cache, so cmake gets them
kde_ctest_write_initial_cache("${CTEST_BINARY_DIRECTORY}" CMAKE_INSTALL_PREFIX
BUILD_experimental
KDE4_BUILD_TESTS)
# configure, build, test, submit
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_submit()
# optionally install afterwards, so additional nightly builds can use this current install
# (e.g. kdepimlibs could use this kdelibs install)
if(DO_INSTALL)
kde_ctest_install("${CTEST_BINARY_DIRECTORY}" )
endif(DO_INSTALL)
############################################################################################
#
# ------------8<-----------------8<---------------------8<---------------------8<-----------
# #!/bin/sh
#
# # point to the directory where KDECTestNightly.cmake is located (in svn: kdesvn/cmake/modules/ )
# export KDECTESTNIGHTLY_DIR=/home/alex/src/kde4-svn/KDE\ dir/kdesdk/cmake/modules/
#
#
# # Set which ctest will be used, where the results should be installed to, and which suffix the
# # build name on my.cdash.org should get:
# CTEST=/opt/cmake-2.6.2-Linux-i386/bin/ctest
# INSTALL_ROOT=/home/alex/Dashboards/installs/2.6.2
# SUFFIX=cmake-2.6.2
#
# # set CMAKE_PREFIX_PATH so that everything necessary for building automoc4 will be found:
# export CMAKE_PREFIX_PATH=/opt/qt-4.5/qt/
#
# $CTEST -V -VV -S ~/src/kde4-svn/kdesupport/automoc/Automoc4Nightly.cmake,KDE_CTEST_BUILD_SUFFIX=$SUFFIX,CMAKE_INSTALL_PREFIX=$INSTALL_ROOT/automoc4,DO_INSTALL=TRUE
#
# # For building kdelibs we need more stuff in CMAKE_PREFIX_PATH:
# export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$INSTALL_ROOT/automoc4
# export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/opt/shared-mime-info
# export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/opt/kdesupport/
#
# $CTEST -V -VV -S ~/src/kde4-svn/KDE\ dir/kdelibs/KDELibsNightly.cmake,KDE_CTEST_BUILD_SUFFIX=$SUFFIX,CMAKE_INSTALL_PREFIX=$INSTALL_ROOT/kdelibs,DO_INSTALL=TRUE
#
# ------------8<-----------------8<---------------------8<---------------------8<-----------

218
Mainpage.dox Normal file
View file

@ -0,0 +1,218 @@
/** @mainpage The KDE Library API Reference
<p><b>
Overview |
@ref components |
@ref development |
@ref search
</b></p>
This is the online reference for developing with the KDE libraries
(kdelibs).
The KDE libraries build on the
<a href="http://qt-project.org/">Qt</a> framework to
provide a powerful framework to make writing applications easier,
and provide consistency across the KDE desktop environment.
Among other things, the KDE libraries provide:
- standard user interface elements, on top of those provided by Qt
(<a href="kdeui/html/index.html">KDEUI</a>)
- a standard configuration format and method of reading and writing
configuration data (<a href="kdecore/html/classKConfig.html">KConfig</a>)
- site-independent access to standard directories, for finding resources such
as icons (<a href="kdecore/html/classKStandardDirs.html">KStandardDirs</a>)
- network transparent input and output (<a href="kio/html/index.html">KIO</a>)
- a method of embedding application components in other applications
(<a href="kparts/html/index.html">KParts</a>)
- straightforward multimedia and hardware interaction
(<a href="/kdesupport-api/phonon-apidocs/">Phonon</a> and
<a href="solid/html/index.html">Solid</a>)
- fully-fledged JavaScript and HTML engines
(<a href="kjs/html/index.html">KJS</a> and
<a href="khtml/html/index.html">KHTML</a>)
- an application scripting framework
(<a href="kross/html/index.html">Kross</a>)
- semantic information and tagging
(<a href="nepomuk-core/html/index.html">Nepomuk</a>)
Visit the <a href="http://techbase.kde.org/Development">development section of KDE
Techbase</a> for tutorials, architectural overviews and other useful information.
@authors
Far too many to list. See the copyright notices on the individual files,
as well as the pages for individual components.
@maintainers
There is no single maintainer for kdelibs. Overall direction is governed by the
<a href="https://mail.kde.org/mailman/listinfo/kde-core-devel">kde-core-devel
mailing list</a>. Some of the individual components have their own maintainers:
see the component pages for more information.
@licenses
Libraries: @lgpl<br>
Some helper binaries: @gpl<br>
Some code may have more permissive licenses.
*/
/** @page components Components
<p><b>
@ref index "Overview" |
Components |
@ref development |
@ref search
</b></p>
Below is a brief summary of the various libraries you may want to use
when developing a KDE application.
Note that there is more to kdelibs than these libraries: on the left
is a complete list of kdelibs components. However, in almost all cases
you will only be interested in the ones listed below. The remaining
ones are mostly implementation details that you don't need to worry
about.
There are also several components you can use. Interfaces to most of
these can be found in the <a href="interfaces/html/index.html">interfaces
section</a>, but you should also be aware of KHTMLPart, which
provides a full web browser component.
<dl>
<dt>KDECore</dt>
<dd>Core KDE classes that are not related to the user interface.<br>
[ <a href="kdecore/html/index.html">Documentation</a> |
<a href="kdecore/html/classes.html">Classes</a> ]</dd>
<dt>KIO</dt>
<dd>KDE's network-transparent input/output system: provides
just about every file-management function you'll ever need.<br>
[ <a href="kio/html/index.html">Documentation</a> |
<a href="kio/html/classes.html">Classes</a> ]</dd>
<dt>KDEUI</dt>
<dd>KDE User Interface classes such as widgets.<br>
[ <a href="kdeui/html/index.html">Documentation</a> |
<a href="kdeui/html/classes.html">Classes</a> ]</dd>
<dt>Phonon</dt>
<dd>KDE's multimedia framework.<br>
[ <a href="/kdesupport-api/kdesupport-apidocs/phonon/html/index.html">Documentation</a> |
<a href="/kdesupport-api/kdesupport-apidocs/phonon/html/group__Frontend.html">Classes</a> ]</dd>
<dt>Solid</dt>
<dd>KDE Hardware Discovery and Management classes.<br>
[ <a href="solid/html/index.html">Documentation</a> |
<a href="solid/html/classes.html">Classes</a> ]</dd>
<dt>Nepomuk</dt>
<dd>The KDE Meta Data library, for metadata assigned to a
resource (such as a file or an email) by the user or
by an application, such as tags or download locations.<br>
[ <a href="nepomuk/html/index.html">Documentation</a> |
<a href="nepomuk/html/classes.html">Classes</a> ]</dd>
<dt>KParts</dt>
<dd>The KDE component library: provides support for re-usable,
embeddable, extendible components for use in applications.<br>
[ <a href="kparts/html/index.html">Documentation</a> |
<a href="kparts/html/classes.html">Classes</a> ]</dd>
<dt>KNewStuff</dt>
<dd>Upload and download of application data.<br>
[ <a href="knewstuff/html/index.html">Documentation</a> |
<a href="knewstuff/html/classes.html">Classes</a> ]</dd>
<dt>KDEPrint</dt>
<dd>The KDE printing system.<br>
[ <a href="kdeprint/html/index.html">Documentation</a> |
<a href="kdeprint/html/classes.html">Classes</a> ]</dd>
<dt>DNSSD</dt>
<dd>Access to the DNSSD (aka Bonjour, Zeroconf) service publishing
and discovery protocol.<br>
[ <a href="dnssd/html/index.html">Documentation</a> |
<a href="dnssd/html/classes.html">Classes</a> ]</dd>
<dt>KJS</dt>
<dd>JavaScript (aka. ECMAScript and JScript) support.<br>
[ <a href="kjs/html/index.html">Documentation</a> |
<a href="kjs/html/classes.html">Classes</a> ]</dd>
<dt>Kross</dt>
<dd>Allows scripting to be added to an application in an
interpreter-independent way.<br>
[ <a href="kross/html/index.html">Documentation</a> |
<a href="kross/html/classes.html">Classes</a> ]</dd>
<dt>ThreadWeaver</dt>
<dd>A job-based multi-threading library<br>
[ <a href="threadweaver/html/index.html">Documentation</a> |
<a href="threadweaver/html/classes.html">Classes</a> ]</dd>
<dt>KDESU</dt>
<dd>Run processes remotely or with elevated privileges.<br>
[ <a href="kdesu/html/index.html">Documentation</a> |
<a href="kdesu/html/classes.html">Classes</a> ]</dd>
<dt>KPty</dt>
<dd>A library for interfacing with pseudo terminals.<br>
[ <a href="kpty/html/index.html">Documentation</a> |
<a href="kpty/html/classes.html">Classes</a> ]</dd>
</dl>
*/
/** @page development Development
<p><b>
@ref index "Overview" |
@ref components |
Development |
@ref search
</b></p>
To follow or get involved with the development of the KDE libraries,
join the <a href="https://mail.kde.org/mailman/listinfo/kde-core-devel">kde-core-devel
mailing list</a>.
Instructions for building a development version of KDE can be found in the
<a href="http://techbase.kde.org/Getting_Started">getting started</a> section
of the <a href="http://techbase.kde.org">KDE Techbase</a>.
*/
/** @page search Search
<p><b>
@ref index "Overview" |
@ref components |
@ref development |
Search
</b></p>
You can search for any class in the public API of the KDE libraries
here.
Note: only enter the class name, without any namespace qualifiers.
@htmlonly
<form action="http://api.kde.org/classmapper.php" method="get">
<input type="text" name="class" value="[classname]" style="width:100%;" onClick="this.value='';"/>
<input type="submit" name="go" value="Go" />
<input type=hidden name="module" value="kdelibs">
<input type=hidden name="version" value="4.8">
</form>
@endhtmlonly
If you want to search for any sort of identifier in kdelibs (and other code
in the KDE SVN repository), you can do so using the
<a href="http://lxr.kde.org">KDE Source Cross-Reference</a> tool.
*/
// DOXYGEN_NAME=kdelibs
// DOXYGEN_ENABLE=YES
// vim:ts=4:sw=4:expandtab:filetype=doxygen

23
Messages.sh Normal file
View file

@ -0,0 +1,23 @@
#! /usr/bin/env bash
find . -type d | fgrep -v '.svn' | fgrep -v '.pc' | sed -e 's,$,/,' > dirs
msh=`find . -name Messages.sh`
for dir in $msh; do
dir=`dirname $dir`
if test "$dir" != "."; then
egrep -v "^$dir" dirs > dirs.new && mv dirs.new dirs
fi
done
fgrep -v "/tests" dirs > dirs.new && mv dirs.new dirs
fgrep -v "/test/" dirs > dirs.new && mv dirs.new dirs
# Include ./kdeui/colors/ explicitly to extract color dialog strings. It is
# otherwise excluded, since it has a local Messages.sh to extract color names.
echo "./kdeui/colors/" >> dirs
dirs=`cat dirs`
find $dirs -maxdepth 1 -name "*.cpp" -print > files
find $dirs -maxdepth 1 -name "*.cc" -print >> files
find $dirs -maxdepth 1 -name "*.h" -print >> files
# Add the kdecore/date files not added in kdecalendarsystems.pot
find ./kdecore/date -name "*.cpp" -o -name "*.cc" -o -name "*.h" | grep -v -E kcalendarsystem.* >> files
$EXTRACTRC `find $dirs -maxdepth 1 \( -name \*.rc -o -name \*.ui -o -name \*.kcfg \) ` >> rc.cpp || exit 11
$XGETTEXT -ktranslate:1,1t -ktranslate:1c,2,2t --files-from=files -o $podir/kdelibs4.pot
rm -f dirs files

240
README Normal file
View file

@ -0,0 +1,240 @@
In this file:
* About kdelibs
* Licensing
* Common Mistakes
* Upgrading
* Compile Problems
* More Info
About kdelibs
-------------
This is version 4.14.3 of the KDE libraries.
This package includes libraries that are central to the development and
execution of a KDE program, as well as internationalization files for these
libraries, misc HTML documentation, theme modules, and regression tests.
Here is an alphabetical list of all individual libraries:
* dnssd
Interface to the DNS-SD (Zeroconf) support.
* interfaces
kparts interface for text editors, mediaplayer and scripting.
* kate
KPart for 'kate', the KDE advanced text editor.
* kde3support
This contains libraries that were part of KDE3, but have been replaced for KDE4
* kdecore
This is the core collection of KDE stuff. Non GUI classes reside here.
* kdesu
Library for password entering and handling
* kdeui
The main collection of misc. user interface classes (widgets).
* kdewidgets
For developers: KDE's custom widgets for Qt Designer.
* kfile
File management widgets and dialogs.
* khtml
The next generation HTML rendering widget designed for Konqueror. This
supports HTML 4, CSS, and a variety of other web related standards.
* kimgio
An all purpose extension to the qimgio class that supports various
image formats.
* kio
Classes that fetch and decode URLs are contained here. This library also
contains "ksycoca", the system configure cache containing services,
applications, servicetypes and mimetypes.
* kjs
Implementation of ECMAScript (aka JavaScript).
* kjsembed
A binding of the ECMAScript language to interface with KDE code.
* knewstuff
Allows applications to easily download data from the Internet to add
new information to the program. e.g. wallpapers, translation packs, etc.
* knotify
Handles user notifications, including sounds, logging to files, etc.
* kparts
KDE component model.
* kpty
Abstraction layer for virtual consoles.
* kross
Scripting host for KDE applications.
* kutils
Utility library for printing, chatting and more.
* nepomuk
Semantic information retrieval and tagging.
* plasma
Framework for the KDE 4 desktop shell and its widgets.
* security
Certificate management and cryptography settings.
* solid
Hardware detection.
* sonnet
Tools for natural language processing, including spell and grammar check.
Includes gui widgets.
* threadweaver
Job-based threading library.
And here is an alphabetical list of all further parts of kdelibs:
* cmake
Build system used throughout KDE.
* doc
Documentation in docbook format.
* includes
Qt-style include file wrappers.
* kconf_update
Auto-Updater for config files.
* kded
The KDE daemon checks for newly installed software, update files
or hostname changes and takes according actions.
* kdoctools
Contains mostly stuff convert XML docbook files via XSLT into
human readable stuff.
* kioslave
I/O subprocesses to handle files, ftp, http, gzip and bzip2 streams.
* kinit
Process launcher (kdeinit), used for fast KDE startup and to launch kioslaves.
* licenses
Contains texts of all used licenses.
* mimetypes
Database of mime types.
Licensing
---------
The libraries themselves have been covered (since Saturday, June 21st, 1997)
by the GNU Library General Public License (LGPL). Any other programs (such
as the examples) are covered by the GNU General Public License (GPL). All
the gory details for the LGPL reside in COPYING.LIB, and for the GPL reside
in COPYING.
Various parts are also covered under a BSD style license, detailed in
licenses/BSD. Currently, code covered under such license is copyrighted by
Theo de Raadt.
When in doubt, check the individual file, they should all have license
headings and other identifying marks.
Common Mistakes
---------------
If cmake claims Qt cannot be found, look at http://qt.nokia.com/
to get a copy of Qt, version 4.7 or newer. If you have peeked there
already, grab the SVN module qt-copy from anonsvn.kde.org, or a snapshot
thereof. Alternatively the svn module qt-copy from svn.kde.org can also be
used.
If you know you have the latest Qt 4, another reason it may not be able to
'find' QT is because it's finding an older version of QT 4. Make sure that
your PATH is set appropriately to find the qmake from the latest Qt 4, and
LD_LIBRARY_PATH is set to include $QTDIR/lib.
Debugging
---------
You can set the CMAKE_BUILD_TYPE option with the cmake, if you want to have
debug code in your KDE libs. If you have the space and can stand code that's
somewhat slower, this is worth it. The extra information really
helps debugging and thus bugfixing.
Available options as of CMake 2.4.5:
Release: Compile with no debugging information, optimization enabled.
Debug: Minimal optimization, with debugging information.
RelWithDebInfo: Normal optimization, with debugging information.
MinSizeRel: No debugging information, with optimization for smallest size.
e.g.: "cmake -DCMAKE_BUILD_TYPE=Debug" when running cmake.
See also the file DEBUG.
Upgrading
---------
KDE 4 applications will try to migrate settings from your KDE 3 installation
where possible.
Compile Problems
----------------
Often, KDE compile failures are not KDE's fault, but the fault of the
compiler or the distribution used. For that reason, please have a look at
http://techbase.kde.org/Getting_Started/Build/FAQ for known issues in certain
OS environments before reporting bugs or going mad :).
KDE 4 requires gcc 3.3 or better as the compiler.
How to report
-------------
Reporting bugs is an art. Why? Because bug reports can help and hinder.
They hinder if the developers are just buried in an avalanche of bug reports.
They spend hours figuring out which bug reports are valid and which aren't,
which bug reports are due to bugs or due to installation problems.
They can be of tremendous help to notify developers on problems in areas that
they normally don't have access (e.g. KDE on AIX) to.
So, here are some tips on bug reporting:
* Make sure your bug is due to KDE ... and not due to a packaging problem of
your OS distributor. For example, most "I can not install the XYZ.rpm"
problem are due to packaging issues. Refer with such questions to your
OS Distributor and his appropriate mailing list or bug reporting tool.
* The chance is high that your bug has already been dealt with ... so look
if there is a newer version of kdelibs available. Reporting bugs for
older, deprecated versions usually don't get that much attention :-)
* Also the chance is high that another one experienced your problem. The
bug report wizard at http://bugs.kde.org/ will help you to find out if your
problem has already been reported.
* KDE Applications come with a Report Bug option in the Help menu that will
fill out many of the forms on the bug reporter tool at http://bugs.kde.org/
for you.
* The best bug report for a project based on voluntary work is of course one
that comes with a patch that solves the problem. :-)
More info
---------
http://www.kde.org/ is a good starting point for info on KDE. If you are a
developer, you may also point your browser to http://techbase.kde.org/.
There is a plethora of mailing lists available, you can gain an overview
quickly by looking at http://lists.kde.org/.

31
README-WIN32.TXT Normal file
View file

@ -0,0 +1,31 @@
This file is intended as entry point for the win32 port of KDELIBS.
Any developer interested into working on the win32 port is invited
to start at http://techbase.kde.org/Projects/KDE_on_Windows for an overview
and status of the port.
BUGS:
- replace the absolute pathes in KDE4LibsDependencies.cmake generated by export_library_dependencies
by variables computed on configure time of package using KDE4LibsDependencies.cmake
(from CMakeLists.txt
# !!! the following stuff does not work because export_library_dependencies
# !!! does not wait until the file is written completly
# export_library_dependencies(${CMAKE_BINARY_DIR}/tmpdeps.cmake)
# file(READ ${CMAKE_BINARY_DIR}/tmpdeps.cmake _deps)
# string(REPLACE "${QT_INSTALL_DIR}" "\${QT_INSTALL_DIR}" __deps "${_deps}")
# file (APPEND ${CMAKE_BINARY_DIR}/KDELibsDependencies.cmake "${__deps}")
TODO:
- add description and version number to shared libraries.
- add application icons to executables -> the cmake macro KDE4_ADD_WIN32_APP_ICON (see KDE4Macros)
is intented to allow this

150
TODO Normal file
View file

@ -0,0 +1,150 @@
This file is meant to be a place to track of medium to large-scale API changes
that we would like to make for the next binary incompatible release.
- Check for forked classes in kde pim and other modules
(Danimo)
- Make KSystemTray add its own reference to KApp, so tray apps that adhere to the
style guide can safely close their main window without having to worry about
the app quitting instead.
(Martijn)
- Sort out reference counting of applications and KMainWindows: Add a setRefCountEnabled()
function to KApplication; deref()ing the last reference should only quit the application
if reference counts are enabled, and the reference count should be disabled by default
so apps that don't use a KMainWindow mostly continue to work. Make the KMainWindow
constructor call setRefCountEnabled(true), and make each KMainWindow hold its own
reference to the application. The KMainWindow should drop its app reference on hide, and
regain it on show.
Make KSysTray also hold a reference to the app. Then apps that use more than one main
window and the tray (like KSIrc and Kopete) will quit at the right time without nasty
hacks.
(Richard Smith)
- Make some long-lasting operations threaded. There are some operations in KDE that
take too long on at least ~500MHz hardware to be done using event loops. Examples
are the use of KLibLoader to dlopen plugins and KRun to fire up other processes.
Konqueror and KMail tend to stall occasionally too, but that's harder to refactor
because the bulk of the work there is X11-related.
(Martijn)
- Make it possible to use SSL-ed sockets outside KIO. KSSL isn't very suitable for
reuse, and the certificate dialogs are not even available in public API at all,
leading e.g. to Kopete IRC duplicating a lot of stuff and all KDE Jabber clients
based on libpsi (PSI, Light Hawk and Kopete) using homebrewn solutions. [How
does this have to do with changing KIO? It's just a request to have that
code in a different form....]
(Martijn)
- Solve need for casting when using bitfield enums (e.g. K3Process::Communication)
by the use of Q_DECLARE_FLAGS/Q_DECLARE_OPERATORS_FOR_FLAGS
(Simon)
- KParts: remove plugin loading from setInstance, add an explicit loadPlugins() call
in all parts that should load plugins (at the end of the derived-part ctor).
(David)
- KParts: come up with better names for ReadOnlyPart and ReadWritePart, ReadOnly
is a minimum requirement, but this does not become clear until you dig deeper
into the class. With QTextEdit and QTextBrowser for instance, the inheritance is
the other way around. E.g.: ReaderPart? ViewerPart?
(David)
- Change classes that store bool data using strings ("true"/"false") to use bool
calls (readBoolEntry()). Although not technicaly a binary incompatiblity...
just something to bring up for possible change (for the better)
Use KConfigXT instead! /FransE
- Is it really necessary to bother people using the KCM APIs with withFallback? I have
never heard of it failing and when would you not like to have that fallback? I think
a default of 'true' would be fine(and remove the argument in the APIs).
(Frans)
- Do we need to have factory arguments in the KCM API? (who would use it anyway?)
(Frans)
- The config options in kdeglobals needs to be cleaned up a little. Perhaps I'm being picky..
* They should be named properly, for example "enableIcons" instead of "EnableIcons". Or atleast
settle on one thing.
* AFAICT it would be the right thing if KWin had its own rc file instead of having its "WM"
section in kdeglobals.
* Shouldn't Sonnet have its own rc file instead of kdeglobals?
* Should we allow spaces in option names?
* Some option names are too short for being understandable. fixed->fixedFont; font->systemWideFont
* Perhaps an own font section?
(Frans)
- Make functions in KHelpMenu virtual so they can be overridden (ex: to provide
an alternative help->contents action)
(George Staikos)
- Make sure all GUI classes adopt well to palette changes.
(Danimo)
- K3ListView lacked a setDnDMode to choose between "dnd to move items" (e.g. keditbookmarks)
and "dnd onto items" (e.g. kmail). Check how to do this with QListView/QTreeView...
(David)
- Add the concept of a session to KIO, in particular for KHTML so that it can
have all of its jobs associated in some way (a unique key of sorts). Will
make SSL much easier to implement and allow removal of many hacks, mostly
involving metadata.
(George Staikos)
- Make KLibLoader default to RTLD_GLOBAL and make necessary changes to make KDE namespace clean.
(Coolo)
Maybe just make sure we don't emit multiple copies of per-class data (vtable,RTTI), then
RTLD_LOCAL should do as well, and it should(?) be simpler this way.
(Lubos)
- Many instances of creating containers on the heap instead of stack, can be replaced? (Caleb Tennis) [where?]
- Add KAssistant - a new KDE standards-compliant wizard, (Jaroslaw Staniek (TODO/KAssistant|Details))
Qt4 has no QWizard (only Q3Wizard left). Add a new KDE standards-compliant wizard with
a bit more powerful API and features like "Steps list" pane on the left hand of the wizard
(user can click any step if developer allowed such action). Example from OO.org:
http://www.openoffice.org/dev_docs/features/2.0/images/mail_merge.jpg
We could add more consistency (using themes, guidelines) in this area,
as in KDE3 some apps implement wizard's features like left-hand funky pictures
or help text again and again
(see http://www.kolab.org/doc/kde-client-manual-0.9cvs20030801-html/c43.html).
Other ideas:
* use nonintrusive "watermark" effect on the 1st or all pages
(http://images.apple.com/macosx/features/setup/images/index_setup20050412.jpg),
* allow to disable steps on the left-side list as an answer to calling setAppropriate().
* QWizard's API is mostly ok for the new class, just avoid requiring to pass a pointer
to page widget (as in setAppropriate()) but allow to pass QString names or IDs instead.
(Jaroslaw Staniek)
- K3IconView/K3ListView equivalents based on Qt4 interview. As discussed on kde-core-devel,
this probably means a custom QItemDelegate instead, to handle single-click/double-click,
execute-mode/select-mode (cf K3IconView), number of lines used for wrapping, "held" signal.
In short, rewriting k3iconview features to be based on interview.
For K3ListView we need to check if QTreeView supports both modes of drag-n-drop (dropping
onto items, and dropping between items like in the bookmark editor).
(David, Till etc.)
- CMake:
* install /share/apps/ksgmltools2/customization/entities/kde-standard-accels.entities
* win32: fix path delimiter problem generated *.bat wrapper (using ' ' instead of ';')
- It looks like most of the functions KStringHandler can be removed. At least, insword, setword,
remrange, and remword could be removed [DONE] . Those four don't seem to be used anywhere inside of KDE. Other
functions like capitalize and reverse seem to be sparsely used.
(Caleb)
- Prevent re-entering event loop in kded to avoid reentrancy problems like with kwallet in KDE3 (Lubos).
- Customizable KToolTip/KWhatsThis widgets (Jaroslaw Staniek),
now KWhatsThis is a part of KDE GSoC "Implement OpenUsability's Context Sensitive
Help Redesign" project, by Joshua Keel, mentored by Ellen Reitmayr
* initial notes: http://wiki.kde.org/tiki-index.php?page=kdelibs4+TODO%2FKToolTip
* design page: http://wiki.kde.org/tiki-index.php?page=KWhatsThis
- Additional (automatic) shortcuts for KMessageBox (Jaroslaw Staniek)
See http://lists.kde.org/?l=kde-usability&m=109688936328920&w=2
- Add KUndoRedoAction which can display a popup with action lists, and use it in
KUndoStack::createRedoAction() and KUndoStack::createUndoAction(). (Jaroslaw Staniek)

4
cmake/CMakeLists.txt Normal file
View file

@ -0,0 +1,4 @@
# automoc comes now from kdesupport, Alex
add_subdirectory(modules)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(AGG AGG INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Blitz BLITZ INCLUDES LIBRARIES)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(BlueZ BLUEZ INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(ENCHANT ENCHANT INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Eigen2 EIGEN2 INCLUDE_DIR )

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(FFmpeg FFMPEG INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Flac FLAC INCLUDE_DIR LIBRARIES OGGFLAC_LIBRARIES)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Flex FLEX VERSION EXECUTABLE)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(GObject GOBJECT INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(GStreamer GSTREAMER INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(LCMS LCMS INCLUDE_DIR LIBRARIES VERSION)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(LibArt LIBART INCLUDE_DIR LIBRARIES)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(LibXslt LIBXSLT INCLUDE_DIR LIBRARIES DEFINITIONS XSLTPROC_EXECUTABLE)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(OpenEXR OPENEXR INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(PCRE PCRE INCLUDE_DIR LIBRARIES)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(QCA2 QCA2 INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(QImageBlitz QIMAGEBLITZ INCLUDES LIBRARIES)

View file

@ -0,0 +1,59 @@
# Run this script via "cmake -P RunAllModuletests.cmake" to
# execute all module tests in one go.
# Run this script with "cmake -DMODULE=foo -P RunAllModuletests.cmake" to
# test only the one specified module.
# To see only the results and not the other cmake output,
# you can grep for "::".
# To have it delete the previous test build dirs, run it with -DCLEAN_DIRS=TRUE
get_filename_component(currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(execute_one_test name)
set(workingDir "${currentDir}/${name}/build")
if(CLEAN_DIRS)
file(REMOVE_RECURSE "${workingDir}")
endif(CLEAN_DIRS)
file(MAKE_DIRECTORY "${workingDir}")
execute_process(COMMAND ${CMAKE_COMMAND} "${currentDir}/${name}"
WORKING_DIRECTORY "${workingDir}")
# now the same with pkg-config disabled
set(workingDir "${currentDir}/${name}/build-no-pkgconfig")
if(CLEAN_DIRS)
file(REMOVE_RECURSE "${workingDir}")
endif(CLEAN_DIRS)
file(MAKE_DIRECTORY "${workingDir}")
execute_process(COMMAND ${CMAKE_COMMAND} -DPKG_CONFIG_EXECUTABLE=echo "${currentDir}/${name}"
WORKING_DIRECTORY "${workingDir}")
endfunction(execute_one_test)
if(DEFINED MODULE)
set(modulesToTest ${MODULE})
else(DEFINED MODULE)
set(modulesToTest AGG
Blitz
BlueZ
ENCHANT
Eigen2
FFmpeg
Flac
Flex
GObject
GStreamer
LCMS
LibArt
LibXslt
OpenEXR
PCRE
QCA2
QImageBlitz
Sqlite
Strigi
USB
Xine
Xmms)
endif(DEFINED MODULE)
foreach(currentModule ${modulesToTest})
execute_one_test(${currentModule})
endforeach(currentModule ${modulesToTest})

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Sqlite SQLITE INCLUDE_DIR LIBRARIES DEFINITIONS)

View file

@ -0,0 +1,17 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
set(STRIGI_MIN_VERSION 0.6.0)
#find_package(Strigi 1.2.3)
test_find_package(Strigi STRIGI VERSION
INCLUDE_DIR
STREAMANALYZER_LIBRARY
STREAMS_LIBRARY
STRIGIQTDBUSCLIENT_LIBRARY
NEEDS_SIGNED_CHAR
NEEDS_CHAR
LINE_ANALYZER_PREFIX
THROUGH_ANALYZER_PREFIX )

View file

@ -0,0 +1,44 @@
# This module provides the macro TEST_FIND_PACKAGE()
#
# TEST_FIND_PACKAGE(package prefix var1 .. varN )
# It can be used to test a CMake Find-module.
# It executes FIND_PACKAGE(<package>) and then prints some results.
# <package> is the same as for FIND_PACKAGE() and
# prefix should be the prefix which is used in that module for
# all variables.
# It checks <prefix>_FOUND to decide whether the module was successful or not.
#
# Example:
# test_find_package(Xine XINE VERSION INCLUDE_DIR LIBRARY)
#
# This will check XINE_FOUND and then print the variables XINE_VERSION, XINE_INCLUDE_DIR and XINE_LIBRARY.
cmake_minimum_required(VERSION 2.6.2)
cmake_policy(SET CMP0000 OLD)
macro(TEST_FIND_PACKAGE package prefix )
# if PKG_CONFIG_EXECUTABLE is set to "echo", FindPkgConfig.cmake
# will not search again for the real pkg-config, as it would if it was set to NOTFOUND
# and still the execute_process(${PKG_CONFIG_EXECUTABLE} ) calls will work
# but never return success.
if("${PKG_CONFIG_EXECUTABLE}" STREQUAL "echo")
message(STATUS ":: ***** Testing Find${package}.cmake, with pkg-config disabled *****")
else("${PKG_CONFIG_EXECUTABLE}" STREQUAL "echo")
message(STATUS ":: ***** Testing Find${package}.cmake *****")
endif("${PKG_CONFIG_EXECUTABLE}" STREQUAL "echo")
find_package(${package})
message(STATUS ":: ***** Results from Find${package}.cmake *****")
if ( ${prefix}_FOUND)
message(STATUS ":: Find${package}.cmake: ${package} has been found")
else ( ${prefix}_FOUND)
message(STATUS ":: Find${package}.cmake: ${package} has NOT been found !")
endif ( ${prefix}_FOUND)
message(STATUS ":: ${prefix}_FOUND: \"${${prefix}_FOUND}\"")
foreach(var ${ARGN})
message(STATUS ":: ${prefix}_${var}: \"${${prefix}_${var}}\"")
endforeach(var)
message(STATUS "::")
endmacro(TEST_FIND_PACKAGE package)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(USB LIBUSB INCLUDE_DIR LIBRARIES)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Xine XINE VERSION BUGFIX_VERSION INCLUDE_DIR LIBRARY XCB_FOUND)

View file

@ -0,0 +1,5 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
test_find_package(Xmms XMMS INCLUDE_DIR LIBRARIES )

View file

@ -0,0 +1,6 @@
in each of the subdirs here is a simple CMakeLists.txt which does a very
basic test for one of the cmake modules in the modules/ directory.
To run them, create a build directory, run cmake and check the output.
(yes, this can of course be enhanced, but it's better than nothing).
Alex

View file

@ -0,0 +1,30 @@
# This is a very basic file for the new style find_package() search mode,
# i.e. Config-mode. It is used by MACRO_WRITE_BASIC_CMAKE_VERSION_FILE() from
# MacroWriteBasicCMakeVersionFile.cmake.
# In this mode find_package() searches for a <package>Config.cmake
# file and an associated <package>Version.cmake file, which it loads to check
# the version number.
# This file can be used with configure_file() to generate such a file for a project
# with very basic logic.
# It sets PACKAGE_VERSION_EXACT if the current version string and the requested
# version string are exactly the same and it sets PACKAGE_VERSION_COMPATIBLE
# if the current version is >= requested version.
# If this is not good enough for your project, you need to write your own
# improved <package>Version.cmake file.
# This file requires the following three variables to be set:
# PROJECT_VERSION_MAJOR
# PROJECT_VERSION_MINOR
# PROJECT_VERSION_PATCH
set(PACKAGE_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@)
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )

View file

@ -0,0 +1,178 @@
## install the cmake files
set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules )
# maybe FindHUNSPELL.cmake doesn't have to be installed ?
# This variable doesn't actually do anything, but it's probably a good idea
# to have it around, so there is a place where the modules which are not installed
# are listed explicitly:
set(cmakeFilesDontInstall
FindHUpnp.cmake
FindPolkitQt.cmake
FindPolkitQt-1.cmake
FindUDev.cmake
)
# Explicitly list all files which will be installed.
# We don't use a GLOB anymore so we can have also cmake files here
# which are used inside kdelibs, but which don't have to be installed (and
# so become part of the public interface of kdelibs which has to be kept
# compatible).
set(cmakeFiles
CheckPointerMember.cmake
CheckPrototypeExists.cmake
CheckStructMember.cmake
FindACL.cmake
FindAGG.cmake
FindAkode.cmake
FindAlsa.cmake
FindAutomoc4.cmake
FindAvahi.cmake
FindBerkeleyDB.cmake
FindBlitz.cmake
FindBlueZ.cmake
FindCarbon.cmake
FindDBusMenuQt.cmake
FindDNSSD.cmake
FindENCHANT.cmake
FindEigen.cmake
FindEigen2.cmake
FindExiv2.cmake
FindFAM.cmake
FindFFmpeg.cmake
FindFlac.cmake
FindFlex.cmake
FindFontconfig.cmake
FindGLIB2.cmake
FindGMP.cmake
FindGObject.cmake
FindGSSAPI.cmake
FindGStreamer.cmake
FindGettext.cmake
FindGphoto2.cmake
FindHUNSPELL.cmake
FindIOKit.cmake
FindKDE4Internal.cmake
FindKDE4Workspace.cmake
FindKDevPlatform.cmake
FindKdcraw.cmake
FindKdeMultimedia.cmake
FindKdepim.cmake
FindKdepimLibs.cmake
FindKexiv2.cmake
FindKipi.cmake
FindKopete.cmake
FindKorundum.cmake
FindLCMS.cmake
FindLibArt.cmake
FindLibAttica.cmake
FindLibKonq.cmake
FindLibLZMA.cmake
FindLibXslt.cmake
FindLibintl.cmake
FindLibraryWithDebug.cmake
FindLinuxWirelesstools.cmake
FindMsgfmt.cmake
FindMusicBrainz.cmake
FindMySQL.cmake
FindNepomuk.cmake
FindNetworkManager.cmake
FindOggVorbis.cmake
FindOpenEXR.cmake
FindPCRE.cmake
FindPhonon.cmake
FindPlasma.cmake
FindPopplerQt4.cmake
FindPostgreSQL.cmake
FindPulseAudio.cmake
FindPyKDE4.cmake
FindPyQt4.cmake
Qt4Macros.cmake
Qt4ConfigDependentSettings.cmake
FindPythonLibrary.cmake
FindQCA2.cmake
FindQImageBlitz.cmake
FindQt4.cmake
FindRUBY.cmake
FindSIP.cmake
FindSamba.cmake
FindSane.cmake
FindSasl2.cmake
FindSharedMimeInfo.cmake
FindSharedDesktopOntologies.cmake
FindSoprano.cmake
FindSqlite.cmake
FindStrigi.cmake
FindTaglib.cmake
FindUSB.cmake
FindWcecompat.cmake
FindX11.cmake
FindXKB.cmake
FindXine.cmake
FindXmms.cmake
HandleImportedTargetsInCMakeRequiredLibraries.cmake
KDE4Defaults.cmake
KDE4Macros.cmake
MacroAddCompileFlags.cmake
MacroAddLinkFlags.cmake
MacroAdditionalCleanFiles.cmake
MacroAppendIf.cmake
MacroBoolTo01.cmake
MacroEnsureOutOfSourceBuild.cmake
MacroEnsureVersion.cmake
MacroKAuth.cmake
MacroLibrary.cmake
MacroLogFeature.cmake
MacroOptionalAddSubdirectory.cmake
MacroOptionalDependPackage.cmake
MacroOptionalFindPackage.cmake
MacroPushRequiredVars.cmake
MacroWriteBasicCMakeVersionFile.cmake
NepomukMacros.cmake
NepomukAddOntologyClasses.cmake
PythonMacros.cmake
SIPMacros.cmake
Win32Macros.cmake
check_installed_exports_file.cmake
config-alsa.h.cmake
create_exe_symlink.cmake
kde4_exec_via_sh.cmake
kde4uic.cmake
cmake-modules-styleguide.txt
kde4init_dummy.cpp.in
kde4init_win32lib_dummy.cpp.in
kde4_cmake_uninstall.cmake.in
kde4automoc.files.in
BasicFindPackageVersion.cmake.in
FindLibPython.py
FindPyKDE4.py
FindPyQt.py
FindSIP.py
PythonCompile.py
)
if (KDE4_ENABLE_UAC_MANIFEST)
set(cmakeFiles ${cmakeFiles} Win32.Manifest.in )
endif (KDE4_ENABLE_UAC_MANIFEST)
install(FILES ${cmakeFiles}
DESTINATION ${module_install_dir} )
# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
#set(FILES_TO_REMOVE
#)
#install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake )
#file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, don't edit\n\n")
#foreach ( _current_FILE ${FILES_TO_REMOVE})
# file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${_current_FILE}\" )\n" )
# file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${_current_FILE} OUTPUT_VARIABLE _dummy)\n" )
#endforeach ( _current_FILE)
if(NOT CMAKE_VERSION VERSION_GREATER 2.8.12)
# create and install a man page for the kdelibs cmake modules
add_custom_target(KDECMakeModulesManPage ALL COMMAND ${CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} --help-custom-modules ${CMAKE_CURRENT_BINARY_DIR}/kdecmake.1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdecmake.1 DESTINATION "${MAN_INSTALL_DIR}/man1")
endif()

View file

@ -0,0 +1,22 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,42 @@
# - Check if the given struct or class has the specified member variable
# CHECK_POINTER_MEMBER (POINTER MEMBER HEADER VARIABLE)
#
# POINTER - the name of the struct or class you are interested in
# MEMBER - the member which existence you want to check
# HEADER - the header(s) where the prototype should be declared
# VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# 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.
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_POINTER_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
SET(_INCLUDE_FILES)
FOREACH (it ${_HEADER})
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
ENDFOREACH (it)
SET(_CHECK_POINTER_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
${_STRUCT} tmp;
tmp->${_MEMBER};
return 0;
}
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_POINTER_MEMBER_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_POINTER_MEMBER)

View file

@ -0,0 +1,41 @@
# - Check if the prototype for a function exists.
# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
#
# FUNCTION - the name of the function you are looking for
# HEADER - the header(s) where the prototype should be declared
# VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# 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.
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
SET(_INCLUDE_FILES)
FOREACH (it ${_HEADER})
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
ENDFOREACH (it)
SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
#ifndef ${_SYMBOL}
int i = sizeof(&${_SYMBOL});
#endif
return 0;
}
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)

View file

@ -0,0 +1,42 @@
# - Check if the given struct or class has the specified member variable
# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
#
# STRUCT - the name of the struct or class you are interested in
# MEMBER - the member which existence you want to check
# HEADER - the header(s) where the prototype should be declared
# VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# 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.
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
SET(_INCLUDE_FILES)
FOREACH (it ${_HEADER})
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
ENDFOREACH (it)
SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
${_STRUCT}* tmp;
tmp->${_MEMBER};
return 0;
}
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_STRUCT_MEMBER)

View file

@ -0,0 +1,36 @@
# - Try to find the ACL library
# Once done this will define
#
# ACL_FOUND - system has the ACL library
# ACL_LIBS - The libraries needed to use ACL
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckIncludeFiles)
check_include_files(attr/libattr.h HAVE_ATTR_LIBATTR_H)
check_include_files(sys/xattr.h HAVE_SYS_XATTR_H)
check_include_files(sys/acl.h HAVE_SYS_ACL_H)
check_include_files(acl/libacl.h HAVE_ACL_LIBACL_H)
if (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H)
set(ACL_HEADERS_FOUND TRUE)
endif (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H)
if (ACL_HEADERS_FOUND)
find_library(ACL_LIBS NAMES acl )
find_library(ATTR_LIBS NAMES attr )
endif (ACL_HEADERS_FOUND)
if (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS)
set(ACL_FOUND TRUE)
set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS})
message(STATUS "Found ACL support: ${ACL_LIBS}")
endif (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS)
mark_as_advanced(ACL_LIBS ATTR_LIBS)

View file

@ -0,0 +1,53 @@
# - Try to find the AGG graphics library
# Once done this will define
#
# AGG_FOUND - system has AGG
# AGG_INCLUDE_DIR - the AGG include directory
# AGG_LIBRARIES - Link these to use AGG
# AGG_DEFINITIONS - Compiler switches required for using AGG
# 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 (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
# in cache already
set(AGG_FOUND TRUE)
else (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_AGG QUIET libagg)
set(AGG_DEFINITIONS ${PC_AGG_CFLAGS_OTHER})
endif (NOT WIN32)
find_path(AGG_INCLUDE_DIR agg2/agg_pixfmt_gray.h
PATHS ${PC_AGG_INCLUDEDIR} ${PC_AGG_INCLUDE_DIRS}
)
find_library(AGG_LIBRARIES NAMES agg
PATHS ${PC_AGG_LIBDIR} ${PC_AGG_LIBRARY_DIRS}
)
if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
set(AGG_FOUND TRUE)
endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
if (AGG_FOUND)
if (NOT AGG_FIND_QUIETLY)
message(STATUS "Found AGG: ${AGG_LIBRARIES}")
endif (NOT AGG_FIND_QUIETLY)
else (AGG_FOUND)
if (AGG_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find AGG")
endif (AGG_FIND_REQUIRED)
endif (AGG_FOUND)
mark_as_advanced(AGG_INCLUDE_DIR AGG_LIBRARIES)
endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)

View file

@ -0,0 +1,52 @@
# - Try to find the aKode library
# Once done this will define
#
# AKODE_FOUND - system has the aKode library
# AKODE_INCLUDE_DIR - the aKode include directory
# AKODE_LIBRARIES - The libraries needed to use aKode
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR)
# in cache already
SET(AKODE_FOUND TRUE)
ELSE (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR)
FIND_PROGRAM(AKODECONFIG_EXECUTABLE NAMES akode-config)
# if akode-config has been found
IF (AKODECONFIG_EXECUTABLE)
EXEC_PROGRAM(${AKODECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE AKODE_LIBRARIES)
EXEC_PROGRAM(${AKODECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE AKODE_INCLUDE_DIR)
IF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR)
SET(AKODE_FOUND TRUE)
STRING(REGEX REPLACE "-I(.+)" "\\1" AKODE_INCLUDE_DIR "${AKODE_INCLUDE_DIR}")
message(STATUS "Found aKode: ${AKODE_LIBRARIES}")
ENDIF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR)
# ensure that they are cached
set(AKODE_INCLUDE_DIR ${AKODE_INCLUDE_DIR})
set(AKODE_LIBRARIES ${AKODE_LIBRARIES})
ENDIF (AKODECONFIG_EXECUTABLE)
IF(AKODE_FOUND)
IF(NOT Akode_FIND_QUIETLY)
MESSAGE(STATUS "Akode found: ${AKODE_LIBRARIES}")
ENDIF(NOT Akode_FIND_QUIETLY)
ELSE(AKODE_FOUND)
IF(Akode_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Akode")
ENDIF(Akode_FIND_REQUIRED)
ENDIF(AKODE_FOUND)
ENDIF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR)

View file

@ -0,0 +1,69 @@
# Alsa check, based on libkmid/configure.in.in.
# Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it)
# It defines ...
# It offers the following macros:
# ALSA_CONFIGURE_FILE(config_header) - generate a config.h, typical usage:
# ALSA_CONFIGURE_FILE(${CMAKE_BINARY_DIR}/config-alsa.h)
# ALSA_VERSION_STRING(version_string) looks for alsa/version.h and reads the version string into
# the first argument passed to the macro
# Copyright (c) 2006, David Faure, <faure@kde.org>
# Copyright (c) 2007, Matthias Kretz <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckIncludeFiles)
include(CheckIncludeFileCXX)
include(CheckLibraryExists)
# Already done by toplevel
find_library(ASOUND_LIBRARY asound)
set(ASOUND_LIBRARY_DIR "")
if(ASOUND_LIBRARY)
get_filename_component(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH)
endif(ASOUND_LIBRARY)
check_library_exists(asound snd_seq_create_simple_port "${ASOUND_LIBRARY_DIR}" HAVE_LIBASOUND2)
if(HAVE_LIBASOUND2)
message(STATUS "Found ALSA: ${ASOUND_LIBRARY}")
else(HAVE_LIBASOUND2)
message(STATUS "ALSA not found")
endif(HAVE_LIBASOUND2)
set(ALSA_FOUND ${HAVE_LIBASOUND2})
find_path(ALSA_INCLUDES alsa/version.h)
macro(ALSA_VERSION_STRING _result)
# check for version in alsa/version.h
if(ALSA_INCLUDES)
file(READ "${ALSA_INCLUDES}/alsa/version.h" _ALSA_VERSION_CONTENT)
string(REGEX REPLACE ".*SND_LIB_VERSION_STR.*\"(.*)\".*" "\\1" ${_result} "${_ALSA_VERSION_CONTENT}")
else(ALSA_INCLUDES)
message(STATUS "ALSA version not known. ALSA output will probably not work correctly.")
endif(ALSA_INCLUDES)
endmacro(ALSA_VERSION_STRING _result)
get_filename_component(_FIND_ALSA_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
macro(ALSA_CONFIGURE_FILE _destFile)
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H)
check_include_files(linux/awe_voice.h HAVE_LINUX_AWE_VOICE_H)
check_include_files(awe_voice.h HAVE_AWE_VOICE_H)
check_include_files(/usr/src/sys/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H)
check_include_files(/usr/src/sys/gnu/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H)
check_include_file_cxx(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H)
check_include_file_cxx(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
check_library_exists(asound snd_pcm_resume "${ASOUND_LIBRARY_DIR}" ASOUND_HAS_SND_PCM_RESUME)
if(ASOUND_HAS_SND_PCM_RESUME)
set(HAVE_SND_PCM_RESUME 1)
endif(ASOUND_HAS_SND_PCM_RESUME)
configure_file(${_FIND_ALSA_MODULE_DIR}/config-alsa.h.cmake ${_destFile})
endmacro(ALSA_CONFIGURE_FILE _destFile)
mark_as_advanced(ALSA_INCLUDES ASOUND_LIBRARY)

View file

@ -0,0 +1,49 @@
# - Try to find automoc4
# Once done this will define
#
# AUTOMOC4_FOUND - automoc4 has been found
# AUTOMOC4_EXECUTABLE - the automoc4 tool
# AUTOMOC4_VERSION - the full version of automoc4
# AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION
# broken into its components
#
# It also adds the following macros
# AUTOMOC4(<target> <SRCS_VAR>)
# Use this to run automoc4 on all files contained in the list <SRCS_VAR>.
#
# AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h ...)
# Use this to add more header files to be processed with automoc4.
#
# AUTOMOC4_ADD_EXECUTABLE(<target_NAME> src1 src2 ...)
# This macro does the same as ADD_EXECUTABLE, but additionally
# adds automoc4 handling for all source files.
#
# AUTOMOC4_ADD_LIBRARY(<target_NAME> src1 src2 ...)
# This macro does the same as ADD_LIBRARY, but additionally
# adds automoc4 handling for all source files.
# Internal helper macro, may change or be removed anytime:
# _ADD_AUTOMOC4_TARGET(<target_NAME> <SRCS_VAR>)
#
# Since version 0.9.88:
# The following two macros are only to be used for KDE4 projects
# and do something which makes sure automoc4 works for KDE. Don't
# use them anywhere else.
# _AUTOMOC4_KDE4_PRE_TARGET_HANDLING(<target_NAME> <SRCS_VAR>)
# _AUTOMOC4_KDE4_POST_TARGET_HANDLING(<target_NAME>)
# Copyright (c) 2008-2009, 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.
# use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file
# see the man page for details
set(_Automoc4_FIND_QUIETLY ${Automoc4_FIND_QUIETLY})
find_package(Automoc4 QUIET NO_MODULE)
set(Automoc4_FIND_QUIETLY ${_Automoc4_FIND_QUIETLY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Automoc4 "Did not find automoc4 (Automoc4Config.cmake, install git://anongit.kde.org/automoc)." AUTOMOC4_EXECUTABLE)

View file

@ -0,0 +1,15 @@
# 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.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(AVAHI_INCLUDE_DIR avahi-common/defs.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Avahi DEFAULT_MSG
AVAHI_INCLUDE_DIR)
mark_as_advanced(AVAHI_INCLUDE_DIR)

View file

@ -0,0 +1,25 @@
# - Try to find Berkeley DB
# Once done this will define
#
# BERKELEY_DB_FOUND - system has Berkeley DB
# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(BERKELEY_DB_INCLUDE_DIR db.h
/usr/include/db4
/usr/local/include/db4
)
find_library(BERKELEY_DB_LIBRARIES NAMES db )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES)
# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES )

View file

@ -0,0 +1,55 @@
###########################################################
######### DEPRECATED, use FindQImageBlitz instead #########
###########################################################
# - Try to find blitz lib
# Once done this will define
#
# BLITZ_FOUND - system has blitz lib
# BLITZ_INCLUDES - the blitz include directory
# BLITZ_LIBRARIES - The libraries needed to use blitz
# 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.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(FindLibraryWithDebug)
if (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
set(Blitz_FIND_QUIETLY TRUE)
endif (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_BLITZ QUIET qimageblitz)
endif (NOT WIN32)
find_path(BLITZ_INCLUDES
NAMES
qimageblitz.h
PATH_SUFFIXES qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/include
${PC_BLITZ_INCLUDEDIR}
${PC_BLITZ_INCLUDE_DIRS}
${KDE4_INCLUDE_DIR}
${INCLUDE_INSTALL_DIR}
)
find_library_with_debug(BLITZ_LIBRARIES
WIN32_DEBUG_POSTFIX d
qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/lib
${PC_BLITZ_LIBRARY_DIRS}
${PC_BLITZ_LIBDIR}
${KDE4_LIB_DIR}
${LIB_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Blitz DEFAULT_MSG
BLITZ_INCLUDES BLITZ_LIBRARIES)
mark_as_advanced(BLITZ_INCLUDES BLITZ_LIBRARIES)

View file

@ -0,0 +1,51 @@
# - Try to find BlueZ
# Once done this will define
#
# BLUEZ_FOUND - system has BlueZ
# BLUEZ_INCLUDE_DIR - the BlueZ include directory
# BLUEZ_LIBRARIES - Link these to use BlueZ
# BLUEZ_DEFINITIONS - Compiler switches required for using BlueZ
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Copyright (c) 2008, Daniel Gollub, <dgollub@suse.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if ( BLUEZ_INCLUDE_DIR AND BLUEZ_LIBRARIES )
# in cache already
set(BlueZ_FIND_QUIETLY TRUE)
endif ( BLUEZ_INCLUDE_DIR AND BLUEZ_LIBRARIES )
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(PC_BLUEZ QUIET bluez)
set(BLUEZ_DEFINITIONS ${PC_BLUEZ_CFLAGS_OTHER})
endif( NOT WIN32 )
find_path(BLUEZ_INCLUDE_DIR NAMES bluetooth/bluetooth.h
PATHS
${PC_BLUEZ_INCLUDEDIR}
${PC_BLUEZ_INCLUDE_DIRS}
/usr/X11/include
)
find_library(BLUEZ_LIBRARIES NAMES bluetooth
PATHS
${PC_BLUEZ_LIBDIR}
${PC_BLUEZ_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BlueZ DEFAULT_MSG BLUEZ_INCLUDE_DIR BLUEZ_LIBRARIES )
# show the BLUEZ_INCLUDE_DIR and BLUEZ_LIBRARIES variables only in the advanced view
mark_as_advanced(BLUEZ_INCLUDE_DIR BLUEZ_LIBRARIES )

View file

@ -0,0 +1,22 @@
# - 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.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CMakeFindFrameworks)
cmake_find_frameworks(Carbon)
if (Carbon_FRAMEWORKS)
set(CARBON_LIBRARY "-framework Carbon" CACHE FILEPATH "Carbon framework" FORCE)
set(CARBON_FOUND 1)
endif (Carbon_FRAMEWORKS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Carbon DEFAULT_MSG CARBON_LIBRARY)

View file

@ -0,0 +1,94 @@
# - Try to find dbusmenu-qt
# This module helps finding an installation of the DBusMenuQt library (see https://launchpad.net/libdbusmenu-qt/)
# Once done this will define
#
# DBUSMENUQT_FOUND - system has dbusmenu-qt
# DBUSMENUQT_INCLUDE_DIR - the dbusmenu-qt include directory
# DBUSMENUQT_LIBRARIES - the libraries needed to use dbusmenu-qt
# DBUSMENUQT_DEFINITIONS - Compiler switches required for using dbusmenu-qt
#
# The minimum required version of DBusMenuQt can be specified using the
# standard syntax, e.g. find_package(DBusMenuQt 0.6)
#
# WARNING: versions below 0.4.0 cannot be checked for.
# So if you want to have a version check, require at least 0.4.0 of dbusmenuqt.
# Copyright (c) 2009, Canonical Ltd.
# - Author: Aurélien Gâteau <aurelien.gateau@canonical.com>
#
# Based on FindQCA2.cmake
# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(FindPackageHandleStandardArgs)
find_package(PkgConfig)
pkg_check_modules(PC_DBUSMENUQT QUIET dbusmenu-qt)
set(DBUSMENUQT_DEFINITIONS ${PC_DBUSMENUQT_CFLAGS_OTHER})
find_library(DBUSMENUQT_LIBRARIES
NAMES dbusmenu-qt dbusmenu-qtd
HINTS ${PC_DBUSMENUQT_LIBDIR} ${PC_DBUSMENUQT_LIBRARY_DIRS}
)
find_path(DBUSMENUQT_INCLUDE_DIR dbusmenuexporter.h
HINTS ${PC_DBUSMENUQT_INCLUDEDIR} ${PC_DBUSMENUQT_INCLUDE_DIRS}
PATH_SUFFIXES dbusmenu-qt
)
# dbusmenu_version.h is installed since 0.4.0, fail if a version below this is required:
if ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0"))
message(FATAL_ERROR "Cannot check reliably for a DBusMenuQt version below 0.4.0 (${DBusMenuQt_FIND_VERSION} was requested)")
endif ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0"))
# find the version number from dbusmenu_version.h and store it in the cache
if(DBUSMENUQT_INCLUDE_DIR AND NOT DBUSMENUQT_VERSION)
# parse the version number out from dbusmenu_version:
if(EXISTS ${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h)
file(READ "${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h" DBUSMENUQT_VERSION_CONTENT)
if ("${DBUSMENUQT_VERSION_CONTENT}" MATCHES "DBUSMENUQT_VERSION_MAJOR") # introduced after 0.6.4, makes this code here more robust
string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MAJOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MINOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define +DBUSMENUQT_VERSION_PATCH +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}")
else("${DBUSMENUQT_VERSION_CONTENT}" MATCHES "DBUSMENUQT_VERSION_MAJOR")
# In versions up to 0.6.4, the code for setting the version number in the header looked like
# shopw below. This made version checking quite un-obvious:
# #define DBUSMENUQT_VERSION \
# ((0 << 16) \
# |(6 << 8) \
# |4)
string(REGEX MATCH "\\(\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "\\|\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "\\| *([0-9]+) *\\)" _dummy "${DBUSMENUQT_VERSION_CONTENT}")
set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}")
endif("${DBUSMENUQT_VERSION_CONTENT}" MATCHES "DBUSMENUQT_VERSION_MAJOR")
endif(EXISTS ${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h)
set(DBUSMENUQT_VERSION "${DBUSMENUQT_VERSION_MAJOR}.${DBUSMENUQT_VERSION_MINOR}.${DBUSMENUQT_VERSION_PATCH}" CACHE STRING "Version number of DBusMenuQt" FORCE)
endif(DBUSMENUQT_INCLUDE_DIR AND NOT DBUSMENUQT_VERSION)
find_package_handle_standard_args(DBusMenuQt REQUIRED_VARS DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR
VERSION_VAR DBUSMENUQT_VERSION)
#"Could not find dbusmenu-qt; available at https://launchpad.net/libdbusmenu-qt/" DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR)
mark_as_advanced(DBUSMENUQT_INCLUDE_DIR DBUSMENUQT_LIBRARIES DBUSMENUQT_VERSION)

View file

@ -0,0 +1,48 @@
# - Try to find DNSSD
# Once done this will define
#
# DNSSD_FOUND - system has DNSSD
# DNSSD_INCLUDE_DIR - the DNSSD include directory
# DNSSD_LIBRARIES - Link these to use dnssd
# DNSSD_DEFINITIONS - Compiler switches required for using DNSSD
#
# need more test: look at into dnssd/configure.in.in
# 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.
FIND_PATH(DNSSD_INCLUDE_DIR dns_sd.h
/usr/include/avahi-compat-libdns_sd/
)
if (DNSSD_INCLUDE_DIR)
if (APPLE)
set(DNSSD_LIBRARIES "/usr/lib/libSystem.dylib")
else (APPLE)
FIND_LIBRARY(DNSSD_LIBRARIES NAMES dns_sd )
endif (APPLE)
MACRO_PUSH_REQUIRED_VARS()
set(CMAKE_REQUIRED_INCLUDES ${DNSSD_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${DNSSD_LIBRARIES})
CHECK_FUNCTION_EXISTS(DNSServiceRefDeallocate DNSSD_FUNCTION_FOUND)
MACRO_POP_REQUIRED_VARS()
if (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND)
set(DNSSD_FOUND TRUE)
endif (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND)
endif (DNSSD_INCLUDE_DIR)
if (DNSSD_FOUND)
if (NOT DNSSD_FIND_QUIETLY)
message(STATUS "Found DNSSD: ${DNSSD_LIBRARIES}")
endif (NOT DNSSD_FIND_QUIETLY)
else (DNSSD_FOUND)
if (DNSSD_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find DNSSD")
endif (DNSSD_FIND_REQUIRED)
endif (DNSSD_FOUND)
MARK_AS_ADVANCED(DNSSD_INCLUDE_DIR DNSSD_LIBRARIES)

View file

@ -0,0 +1,67 @@
# Try to find DocBook XML DTDs
# Once done, it will define:
#
# DOCBOOKXML_FOUND - system has the required DocBook XML DTDs
# DOCBOOKXML_CURRENTDTD_VERSION - the version of currently used DocBook XML
# DTD
# DOCBOOKXML_CURRENTDTD_DIR - the directory containing the definition of
# the currently used DocBook XML version
# Copyright (c) 2010, Luigi Toscano, <luigi.toscano@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
set (DOCBOOKXML_CURRENTDTD_VERSION "4.2"
CACHE INTERNAL "Required version of XML DTDs")
set (DTD_PATH_LIST
share/xml/docbook/schema/dtd/${DOCBOOKXML_CURRENTDTD_VERSION}
share/xml/docbook/xml-dtd-${DOCBOOKXML_CURRENTDTD_VERSION}
share/sgml/docbook/xml-dtd-${DOCBOOKXML_CURRENTDTD_VERSION}
share/xml/docbook/${DOCBOOKXML_CURRENTDTD_VERSION}
)
find_path (DOCBOOKXML_CURRENTDTD_DIR docbookx.dtd
PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
PATH_SUFFIXES ${DTD_PATH_LIST}
)
if (NOT DOCBOOKXML_CURRENTDTD_DIR)
# hacks for systems that use the package version in the DTD dirs,
# e.g. Fedora, OpenSolaris
set (DTD_PATH_LIST)
foreach (DTD_PREFIX_ITER ${CMAKE_SYSTEM_PREFIX_PATH})
file(GLOB DTD_SUFFIX_ITER RELATIVE ${DTD_PREFIX_ITER}
${DTD_PREFIX_ITER}/share/sgml/docbook/xml-dtd-${DOCBOOKXML_CURRENTDTD_VERSION}-*
)
if (DTD_SUFFIX_ITER)
list (APPEND DTD_PATH_LIST ${DTD_SUFFIX_ITER})
endif ()
endforeach ()
find_path (DOCBOOKXML_CURRENTDTD_DIR docbookx.dtd
PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
PATH_SUFFIXES ${DTD_PATH_LIST}
)
endif (NOT DOCBOOKXML_CURRENTDTD_DIR)
#set (DOCBOOKXML_OLDDTD_DIR ${DOCBOOKXML_CURRENTDTD_DIR})
#set (DOCBOOKXML_OLDDTD_VERSION "4.1.2")
#set (DTD_PATH_LIST)
# share/xml/docbook/schema/dtd/${DOCBOOKXML_OLDDTD_VERSION}
# share/xml/docbook/xml-dtd-${DOCBOOKXML_OLDDTD_VERSION}
# share/sgml/docbook/xml-dtd-${DOCBOOKXML_OLDDTD_VERSION}
# share/xml/docbook/${DOCBOOKXML_OLDDTD_VERSION}
#)
#find_path (DOCBOOKXML_OLDDTD_DIR docbookx.dtd
# PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
# PATH_SUFFIXES ${DTD_PATH_LIST}
#)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args (DocBookXML
"Could NOT find DocBook XML DTDs (v${DOCBOOKXML_CURRENTDTD_VERSION})"
DOCBOOKXML_CURRENTDTD_DIR DOCBOOKXML_CURRENTDTD_VERSION)
mark_as_advanced (DOCBOOKXML_CURRENTDTD_DIR DOCBOOKXML_CURRENTDTD_VERSION)

View file

@ -0,0 +1,52 @@
# Try to find DocBook XSL stylesheet
# Once done, it will define:
#
# DOCBOOKXSL_FOUND - system has the required DocBook XML DTDs
# DOCBOOKXSL_DIR - the directory containing the stylesheets
# used to process DocBook XML
# Copyright (c) 2010, Luigi Toscano, <luigi.toscano@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
set (STYLESHEET_PATH_LIST
share/xml/docbook/stylesheet/docbook-xsl
share/xml/docbook/xsl-stylesheets
share/sgml/docbook/xsl-stylesheets
share/xml/docbook/stylesheet/nwalsh/current
share/xml/docbook/stylesheet/nwalsh
share/xsl/docbook
share/xsl/docbook-xsl
)
find_path (DOCBOOKXSL_DIR lib/lib.xsl
PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
PATH_SUFFIXES ${STYLESHEET_PATH_LIST}
)
if (NOT DOCBOOKXSL_DIR)
# hacks for systems that put the version in the stylesheet dirs
set (STYLESHEET_PATH_LIST)
foreach (STYLESHEET_PREFIX_ITER ${CMAKE_SYSTEM_PREFIX_PATH})
file(GLOB STYLESHEET_SUFFIX_ITER RELATIVE ${STYLESHEET_PREFIX_ITER}
${STYLESHEET_PREFIX_ITER}/share/xml/docbook/xsl-stylesheets-*
)
if (STYLESHEET_SUFFIX_ITER)
list (APPEND STYLESHEET_PATH_LIST ${STYLESHEET_SUFFIX_ITER})
endif ()
endforeach ()
find_path (DOCBOOKXSL_DIR VERSION
PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
PATH_SUFFIXES ${STYLESHEET_PATH_LIST}
)
endif (NOT DOCBOOKXSL_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args (DocBookXSL
"Could NOT find DocBook XSL stylesheets"
DOCBOOKXSL_DIR)
mark_as_advanced (DOCBOOKXSL_DIR)

View file

@ -0,0 +1,44 @@
# - Try to find the Enchant spell checker
# Once done this will define
#
# ENCHANT_FOUND - system has ENCHANT
# ENCHANT_INCLUDE_DIR - the ENCHANT include directory
# ENCHANT_LIBRARIES - Link these to use ENCHANT
# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT
# Copyright (c) 2006, Zack Rusin, <zack@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 (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
# in cache already
set(ENCHANT_FOUND TRUE)
else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_ENCHANT QUIET enchant)
set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER})
endif (NOT WIN32)
find_path(ENCHANT_INCLUDE_DIR
NAMES enchant++.h
HINTS ${PC_ENCHANT_INCLUDEDIR}
${PC_ENCHANT_INCLUDE_DIRS}
PATH_SUFFIXES enchant )
find_library(ENCHANT_LIBRARIES NAMES enchant
HINTS ${PC_ENCHANT_LIBDIR}
${PC_ENCHANT_LIBRARY_DIRS} )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES )
mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)

View file

@ -0,0 +1,24 @@
# Note that Eigen1 is deprecated in favor of Eigen2. So this file is deprecated
# in favor of FindEigen2.cmake. It is kept only for compatibility.
#
# - Try to find Eigen1 library
# Once done this will define
#
# 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.
find_path(EIGEN_INCLUDE_DIR NAMES eigen/matrix.h
PATHS
${INCLUDE_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR )
mark_as_advanced(EIGEN_INCLUDE_DIR)

View file

@ -0,0 +1,55 @@
# - Try to find Eigen2 lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(Eigen2 2.0.3)
# to require version 2.0.3 to newer of Eigen2.
#
# Once done this will define
#
# EIGEN2_FOUND - system has eigen lib with correct version
# EIGEN2_INCLUDE_DIR - the eigen include directory
# EIGEN2_VERSION - eigen version
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Redistribution and use is allowed according to the terms of the BSD license.
if(NOT Eigen2_FIND_VERSION)
set(Eigen2_FIND_VERSION_MAJOR 2)
set(Eigen2_FIND_VERSION_MINOR 0)
set(Eigen2_FIND_VERSION_PATCH 0)
set(Eigen2_FIND_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
endif(NOT Eigen2_FIND_VERSION)
macro(_eigen2_get_version)
file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}")
set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}")
set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}")
set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
endmacro(_eigen2_get_version)
find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
PATHS
${INCLUDE_INSTALL_DIR}
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen2
)
if(EIGEN2_INCLUDE_DIR)
_eigen2_get_version()
endif(EIGEN2_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen2 REQUIRED_VARS EIGEN2_INCLUDE_DIR
VERSION_VAR EIGEN2_VERSION)
mark_as_advanced(EIGEN2_INCLUDE_DIR)

View file

@ -0,0 +1,80 @@
# - Try to find the Exiv2 library
#
# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need
# before doing FIND_PACKAGE(Exiv2). The default is 0.12.
#
# Once done this will define
#
# EXIV2_FOUND - system has libexiv2
# EXIV2_INCLUDE_DIR - the libexiv2 include directory
# EXIV2_LIBRARIES - Link these to use libexiv2
# EXIV2_DEFINITIONS - Compiler switches required for using libexiv2
#
# The minimum required version of Exiv2 can be specified using the
# standard syntax, e.g. find_package(Exiv2 0.17)
#
# For compatibility, also the variable EXIV2_MIN_VERSION can be set to the minimum version
# you need before doing FIND_PACKAGE(Exiv2). The default is 0.12.
# Copyright (c) 2010, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Support EXIV2_MIN_VERSION for compatibility:
if(NOT Exiv2_FIND_VERSION)
set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}")
endif(NOT Exiv2_FIND_VERSION)
# the minimum version of exiv2 we require
if(NOT Exiv2_FIND_VERSION)
set(Exiv2_FIND_VERSION "0.12")
endif(NOT Exiv2_FIND_VERSION)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_EXIV2 QUIET exiv2)
set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER})
endif (NOT WIN32)
find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp
HINTS
${PC_EXIV2_INCLUDEDIR}
${PC_EXIV2_INCLUDE_DIRS}
)
find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2
HINTS
${PC_EXIV2_LIBDIR}
${PC_EXIV2_LIBRARY_DIRS}
)
# Get the version number from exiv2/version.hpp and store it in the cache:
if(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT)
string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}")
set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}")
set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE STRING "Version number of Exiv2" FORCE)
endif(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR
VERSION_VAR EXIV2_VERSION)
mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY)

View file

@ -0,0 +1,22 @@
# - Try to find the FAM directory notification library
# Once done this will define
#
# FAM_FOUND - system has FAM
# FAM_INCLUDE_DIR - the FAM include directory
# FAM_LIBRARIES - The libraries needed to use FAM
# 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.
FIND_PATH(FAM_INCLUDE_DIR fam.h)
FIND_LIBRARY(FAM_LIBRARIES NAMES fam )
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FAM DEFAULT_MSG FAM_INCLUDE_DIR FAM_LIBRARIES )
MARK_AS_ADVANCED(FAM_INCLUDE_DIR FAM_LIBRARIES)

View file

@ -0,0 +1,148 @@
# vim: ts=2 sw=2
# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)
#
# Once done this will define
# FFMPEG_FOUND - System has the all required components.
# FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers.
# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
# FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components.
#
# For each of the components it will additionally set.
# - AVCODEC
# - AVDEVICE
# - AVFORMAT
# - AVUTIL
# - POSTPROCESS
# - SWSCALE
# the following variables will be defined
# <component>_FOUND - System has <component>
# <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
# <component>_LIBRARIES - Link these to use <component>
# <component>_DEFINITIONS - Compiler switches required for using <component>
# <component>_VERSION - The components version
#
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(FindPackageHandleStandardArgs)
# The default components were taken from a survey over other FindFFMPEG.cmake files
if (NOT FFmpeg_FIND_COMPONENTS)
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
endif ()
#
### Macro: set_component_found
#
# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present.
#
macro(set_component_found _component )
if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
# message(STATUS " - ${_component} found.")
set(${_component}_FOUND TRUE)
else ()
# message(STATUS " - ${_component} not found.")
endif ()
endmacro()
#
### Macro: find_component
#
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
# include directories.
#
macro(find_component _component _pkgconfig _library _header)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_${_component} ${_pkgconfig})
endif ()
endif (NOT WIN32)
find_path(${_component}_INCLUDE_DIRS ${_header}
HINTS
${PC_${_component}_INCLUDEDIR}
${PC_${_component}_INCLUDE_DIRS}
PATH_SUFFIXES
ffmpeg
)
find_library(${_component}_LIBRARIES NAMES ${_library}
HINTS
${PC_${_component}_LIBDIR}
${PC_${_component}_LIBRARY_DIRS}
)
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
set_component_found(${_component})
mark_as_advanced(
${_component}_INCLUDE_DIRS
${_component}_LIBRARIES
${_component}_DEFINITIONS
${_component}_VERSION)
endmacro()
# Check for cached results. If there are skip the costly part.
if (NOT FFMPEG_LIBRARIES)
# Check for all possible component.
find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h)
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
foreach (_component ${FFmpeg_FIND_COMPONENTS})
if (${_component}_FOUND)
# message(STATUS "Required component ${_component} present.")
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
else ()
# message(STATUS "Required component ${_component} missing.")
endif ()
endforeach ()
# Build the include path with duplicates removed.
if (FFMPEG_INCLUDE_DIRS)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
endif ()
# cache the vars.
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE)
mark_as_advanced(FFMPEG_INCLUDE_DIRS
FFMPEG_LIBRARIES
FFMPEG_DEFINITIONS)
endif ()
# Now set the noncached _FOUND vars for the components.
foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
set_component_found(${_component})
endforeach ()
# Compile the list of required vars
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
foreach (_component ${FFmpeg_FIND_COMPONENTS})
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
endforeach ()
# Give a nice error message if some of the required vars are missing.
find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS})

View file

@ -0,0 +1,34 @@
# - Try to find Flac, the Free Lossless Audio Codec
# Once done this will define
#
# FLAC_FOUND - system has Flac
# FLAC_INCLUDE_DIR - the Flac include directory
# FLAC_LIBRARIES - Link these to use Flac
# FLAC_OGGFLAC_LIBRARIES - Link these to use OggFlac
#
# No version checking is done - use FLAC_API_VERSION_CURRENT to
# conditionally compile version-dependent code
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
# 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.
FIND_PATH(FLAC_INCLUDE_DIR FLAC/metadata.h)
FIND_LIBRARY(FLAC_LIBRARIES NAMES FLAC )
FIND_LIBRARY(FLAC_OGG_LIBRARY NAMES OggFLAC)
IF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY)
SET(FLAC_OGGFLAC_LIBRARIES ${FLAC_OGG_LIBRARY} ${FLAC_LIBRARIES})
ENDIF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Flac REQUIRED_VARS FLAC_LIBRARIES FLAC_INCLUDE_DIR)
# show the FLAC_INCLUDE_DIR and FLAC_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(FLAC_INCLUDE_DIR FLAC_LIBRARIES FLAC_OGG_LIBRARY)

View file

@ -0,0 +1,45 @@
# - Try to find Flex
# Once done this will define
#
# FLEX_FOUND - system has Flex
# FLEX_EXECUTABLE - path of the flex executable
# FLEX_VERSION - the version string, like "2.5.31"
#
# The minimum required version of Flex can be specified using the
# standard syntax, e.g. find_package(Flex 2.5)
# Copyright (c) 2008, Jakob Petsovits, <jpetso@gmx.at>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF(WIN32)
# Store CMAKE_MODULE_PATH so that the cmake supplied FindFLEX.cmake is
# used since cmake FIND_PACKAGE is case insensitive on Windows
SET(_kde_cmake_module_path_back ${CMAKE_MODULE_PATH})
SET(CMAKE_MODULE_PATH)
FIND_PACKAGE(FLEX)
SET(CMAKE_MODULE_PATH ${_kde_cmake_module_path_back})
SET(_kde_cmake_module_path_back)
ELSE(WIN32)
FIND_PROGRAM(FLEX_EXECUTABLE NAMES flex)
FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h )
FIND_LIBRARY(FLEX_LIBRARY fl)
IF(FLEX_EXECUTABLE AND NOT FLEX_VERSION)
EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
OUTPUT_VARIABLE _FLEX_VERSION_OUTPUT
)
STRING (REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" _FLEX_VERSION "${_FLEX_VERSION_OUTPUT}")
SET(FLEX_VERSION "${_FLEX_VERSION}" CACHE STRING "Version number of Flex" FORCE)
ENDIF(FLEX_EXECUTABLE AND NOT FLEX_VERSION)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Flex REQUIRED_VARS FLEX_EXECUTABLE
VERSION_VAR FLEX_VERSION )
MARK_AS_ADVANCED(FLEX_INCLUDE_DIR FLEX_LIBRARY FLEX_EXECUTABLE)
ENDIF(WIN32)

View file

@ -0,0 +1,50 @@
# - Try to find the Fontconfig
# Once done this will define
#
# FONTCONFIG_FOUND - system has Fontconfig
# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
# Copyright (c) 2006,2007 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 (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
# in cache already
set(FONTCONFIG_FOUND TRUE)
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
endif (NOT WIN32)
find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
PATHS
${PC_FONTCONFIG_INCLUDEDIR}
${PC_FONTCONFIG_INCLUDE_DIRS}
/usr/X11/include
)
find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
PATHS
${PC_FONTCONFIG_LIBDIR}
${PC_FONTCONFIG_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)

View file

@ -0,0 +1,52 @@
# - Try to find the GLIB2 libraries
# Once done this will define
#
# GLIB2_FOUND - system has glib2
# GLIB2_INCLUDE_DIR - the glib2 include directory
# GLIB2_LIBRARIES - glib2 library
# Copyright (c) 2008 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(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
# Already in cache, be silent
set(GLIB2_FIND_QUIETLY TRUE)
endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
find_package(PkgConfig)
pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0)
find_path(GLIB2_MAIN_INCLUDE_DIR
NAMES glib.h
HINTS ${PC_LibGLIB2_INCLUDEDIR}
PATH_SUFFIXES glib-2.0)
find_library(GLIB2_LIBRARY
NAMES glib-2.0
HINTS ${PC_LibGLIB2_LIBDIR}
)
set(GLIB2_LIBRARIES ${GLIB2_LIBRARY})
# search the glibconfig.h include dir under the same root where the library is found
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
PATH_SUFFIXES glib-2.0/include
HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
# not sure if this include dir is optional or required
# for now it is optional
if(GLIB2_INTERNAL_INCLUDE_DIR)
set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
endif(GLIB2_INTERNAL_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)

View file

@ -0,0 +1,23 @@
# 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
# 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 (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
# Already in cache, be silent
set(GMP_FIND_QUIETLY TRUE)
endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
find_path(GMP_INCLUDE_DIR NAMES gmp.h )
find_library(GMP_LIBRARIES NAMES gmp libgmp)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)
mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)

View file

@ -0,0 +1,52 @@
# - Try to find GObject
# Once done this will define
#
# GOBJECT_FOUND - system has GObject
# GOBJECT_INCLUDE_DIR - the GObject include directory
# GOBJECT_LIBRARIES - the libraries needed to use GObject
# GOBJECT_DEFINITIONS - Compiler switches required for using GObject
# Copyright (c) 2011, Raphael Kubo da Costa <kubito@gmail.com>
# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0)
SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER})
FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h
HINTS
${PC_GOBJECT_INCLUDEDIR}
${PC_GOBJECT_INCLUDE_DIRS}
PATH_SUFFIXES glib-2.0/gobject/
)
FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0
HINTS
${PC_GOBJECT_LIBDIR}
${PC_GOBJECT_LIBRARY_DIRS}
)
FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0
HINTS
${PC_GOBJECT_LIBDIR}
${PC_GOBJECT_LIBRARY_DIRS}
)
FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0
HINTS
${PC_GOBJECT_LIBDIR}
${PC_GOBJECT_LIBRARY_DIRS}
)
FIND_LIBRARY(_GLibs NAMES glib-2.0
HINTS
${PC_GOBJECT_LIBDIR}
${PC_GOBJECT_LIBRARY_DIRS}
)
SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} )
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR)
MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs)

View file

@ -0,0 +1,78 @@
# - Try to detect the GSSAPI support
# Once done this will define
#
# GSSAPI_FOUND - system supports GSSAPI
# GSSAPI_INCS - the GSSAPI include directory
# GSSAPI_LIBS - the libraries needed to use GSSAPI
# GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
# in cache already
set(GSSAPI_FOUND TRUE)
else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
find_program(KRB5_CONFIG NAMES krb5-config PATHS
/opt/local/bin
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
)
mark_as_advanced(KRB5_CONFIG)
#reset vars
set(GSSAPI_INCS)
set(GSSAPI_LIBS)
set(GSSAPI_FLAVOR)
if(KRB5_CONFIG)
set(HAVE_KRB5_GSSAPI TRUE)
exec_program(${KRB5_CONFIG} ARGS --libs gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_LIBS)
if(_return_VALUE)
message(STATUS "GSSAPI configure check failed.")
set(HAVE_KRB5_GSSAPI FALSE)
endif(_return_VALUE)
exec_program(${KRB5_CONFIG} ARGS --cflags gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_INCS)
string(REGEX REPLACE "(\r?\n)+$" "" GSSAPI_INCS "${GSSAPI_INCS}")
string(REGEX REPLACE " *-I" ";" GSSAPI_INCS "${GSSAPI_INCS}")
exec_program(${KRB5_CONFIG} ARGS --vendor RETURN_VALUE _return_VALUE OUTPUT_VARIABLE gssapi_flavor_tmp)
set(GSSAPI_FLAVOR_MIT)
if(gssapi_flavor_tmp MATCHES ".*Massachusetts.*")
set(GSSAPI_FLAVOR "MIT")
else(gssapi_flavor_tmp MATCHES ".*Massachusetts.*")
set(GSSAPI_FLAVOR "HEIMDAL")
endif(gssapi_flavor_tmp MATCHES ".*Massachusetts.*")
if(NOT HAVE_KRB5_GSSAPI)
if (gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
message(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.")
set(GSSAPI_LIBS)
set(GSSAPI_INCS)
else(gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
message(WARNING "${KRB5_CONFIG} failed unexpectedly.")
endif(gssapi_flavor_tmp MATCHES "Sun Microsystems.*")
endif(NOT HAVE_KRB5_GSSAPI)
if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that
set(GSSAPI_FOUND TRUE)
message(STATUS "Found GSSAPI: ${GSSAPI_LIBS}")
set(GSSAPI_INCS ${GSSAPI_INCS})
set(GSSAPI_LIBS ${GSSAPI_LIBS})
set(GSSAPI_FLAVOR ${GSSAPI_FLAVOR})
mark_as_advanced(GSSAPI_INCS GSSAPI_LIBS GSSAPI_FLAVOR)
endif(GSSAPI_LIBS)
endif(KRB5_CONFIG)
endif(GSSAPI_LIBS AND GSSAPI_FLAVOR)

View file

@ -0,0 +1,80 @@
# - Try to find GStreamer
# Once done this will define
#
# GSTREAMER_FOUND - system has GStreamer
# GSTREAMER_INCLUDE_DIR - the GStreamer include directory
# GSTREAMER_LIBRARIES - the libraries needed to use GStreamer
# GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer
# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# 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_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY)
# in cache already
SET(GStreamer_FIND_QUIETLY TRUE)
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_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY)
IF (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_GSTREAMER QUIET gstreamer-0.10)
#MESSAGE(STATUS "DEBUG: GStreamer include directory = ${GSTREAMER_INCLUDE_DIRS}")
#MESSAGE(STATUS "DEBUG: GStreamer link directory = ${GSTREAMER_LIBRARY_DIRS}")
#MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS_OTHER}")
SET(GSTREAMER_DEFINITIONS ${PC_GSTREAMER_CFLAGS_OTHER})
ENDIF (NOT WIN32)
FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h
PATHS
${PC_GSTREAMER_INCLUDEDIR}
${PC_GSTREAMER_INCLUDE_DIRS}
#PATH_SUFFIXES gst
)
FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10
PATHS
${PC_GSTREAMER_LIBDIR}
${PC_GSTREAMER_LIBRARY_DIRS}
)
FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10
PATHS
${PC_GSTREAMER_LIBDIR}
${PC_GSTREAMER_LIBRARY_DIRS}
)
FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10
PATHS
${PC_GSTREAMER_LIBDIR}
${PC_GSTREAMER_LIBRARY_DIRS}
)
IF (GSTREAMER_INCLUDE_DIR)
#MESSAGE(STATUS "DEBUG: Found GStreamer include dir: ${GSTREAMER_INCLUDE_DIR}")
ELSE (GSTREAMER_INCLUDE_DIR)
MESSAGE(STATUS "GStreamer: WARNING: include dir not found")
ENDIF (GSTREAMER_INCLUDE_DIR)
IF (GSTREAMER_LIBRARIES)
#MESSAGE(STATUS "DEBUG: Found GStreamer library: ${GSTREAMER_LIBRARIES}")
ELSE (GSTREAMER_LIBRARIES)
MESSAGE(STATUS "GStreamer: WARNING: library not found")
ENDIF (GSTREAMER_LIBRARIES)
IF (GSTREAMER_INTERFACE_LIBRARY)
#MESSAGE(STATUS "DEBUG: Found GStreamer interface library: ${GSTREAMER_INTERFACE_LIBRARY}")
ELSE (GSTREAMER_INTERFACE_LIBRARY)
MESSAGE(STATUS "GStreamer: WARNING: interface library not found")
ENDIF (GSTREAMER_INTERFACE_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIR GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY)
MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY)

View file

@ -0,0 +1,246 @@
# Try to find Gettext functionality
# Once done this will define
#
# GETTEXT_FOUND - system has Gettext
# GETTEXT_INCLUDE_DIR - Gettext include directory
# GETTEXT_LIBRARIES - Libraries needed to use Gettext
# TODO: This will enable translations only if Gettext functionality is
# present in libc. Must have more robust system for release, where Gettext
# functionality can also reside in standalone Gettext library, or the one
# embedded within kdelibs (cf. gettext.m4 from Gettext source).
#
# Copyright (c) 2006, Chusslove Illich, <caslav.ilic@gmx.net>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (LIBC_HAS_DGETTEXT OR LIBINTL_HAS_DGETTEXT)
# in cache already
set(GETTEXT_FOUND TRUE)
else (LIBC_HAS_DGETTEXT OR LIBINTL_HAS_DGETTEXT)
include(CheckLibraryExists)
include(CheckFunctionExists)
find_path(GETTEXT_INCLUDE_DIR libintl.h)
if(GETTEXT_INCLUDE_DIR)
set(HAVE_LIBINTL_H 1)
else(GETTEXT_INCLUDE_DIR)
set(HAVE_LIBINTL_H 0)
endif(GETTEXT_INCLUDE_DIR)
set(GETTEXT_LIBRARIES)
if (HAVE_LIBINTL_H)
check_function_exists(dgettext LIBC_HAS_DGETTEXT)
if (LIBC_HAS_DGETTEXT)
set(GETTEXT_SOURCE "built in libc")
set(GETTEXT_FOUND TRUE)
else (LIBC_HAS_DGETTEXT)
find_library(LIBINTL_LIBRARY NAMES intl libintl )
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
if (LIBINTL_HAS_DGETTEXT)
set(GETTEXT_SOURCE "in ${LIBINTL_LIBRARY}")
set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY})
set(GETTEXT_FOUND TRUE)
endif (LIBINTL_HAS_DGETTEXT)
endif (LIBC_HAS_DGETTEXT)
endif (HAVE_LIBINTL_H)
if (GETTEXT_FOUND)
if (NOT Gettext_FIND_QUIETLY)
message(STATUS "Found Gettext: ${GETTEXT_SOURCE}")
endif (NOT Gettext_FIND_QUIETLY)
else (GETTEXT_FOUND)
if (Gettext_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find Gettext")
endif (Gettext_FIND_REQUIRED)
endif (GETTEXT_FOUND)
mark_as_advanced(GETTEXT_INCLUDE_DIR GETTEXT_LIBRARIES)
endif (LIBC_HAS_DGETTEXT OR LIBINTL_HAS_DGETTEXT)
# - Find GNU gettext tools
# This module looks for the GNU gettext tools. This module defines the
# following values:
# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
# GETTEXT_FOUND: True if gettext has been found.
#
# Additionally it provides the following macros:
# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
# This will create a target "translations" which will convert the
# given input po files into the binary output mo file. If the
# ALL option is used, the translations will also be created when
# building the default target.
# GETTEXT_PROCESS_POT( <potfile> [ALL] [INSTALL_DESTINATION <destdir>] <lang1> <lang2> ... )
# Process the given pot file to mo files.
# If INSTALL_DESTINATION is given then automatically install rules will be created,
# the language subdirectory will be taken into account (by default use share/locale/).
# If ALL is specified, the pot file is processed when building the all traget.
# It creates a custom target "potfile".
#
# GETTEXT_PROCESS_PO_FILES(<lang> [ALL] [INSTALL_DESTINATION <dir>] <po1> <po2> ...)
# Process the given po files to mo files for the given language.
# If INSTALL_DESTINATION is given then automatically install rules will be created,
# the language subdirectory will be taken into account (by default use share/locale/).
# If ALL is specified, the po files are processed when building the all traget.
# It creates a custom target "pofiles".
FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)
SET(_gmoFiles)
GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
SET(_addToAll)
IF(${_firstPoFile} STREQUAL "ALL")
SET(_addToAll "ALL")
SET(_firstPoFile)
ENDIF(${_firstPoFile} STREQUAL "ALL")
FOREACH (_currentPoFile ${ARGN})
GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE)
GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH)
GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE)
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
ADD_CUSTOM_COMMAND(
OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
DEPENDS ${_absPotFile} ${_absFile}
)
INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
SET(_gmoFiles ${_gmoFiles} ${_gmoFile})
ENDFOREACH (_currentPoFile )
ADD_CUSTOM_TARGET(translations ${_addToAll} DEPENDS ${_gmoFiles})
ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
# GETTEXT_PROCESS_POT( <potfile> [ALL] [INSTALL_DESTINATION <destdir>] <lang1> <lang2> ... )
MACRO(GETTEXT_PROCESS_POT_FILE _potFile)
SET(_gmoFiles)
SET(_args ${ARGN})
SET(_addToAll)
SET(_installDest)
IF(_args)
LIST(GET _args 0 _tmp)
IF("${_tmp}" STREQUAL "ALL")
SET(_addToAll ALL)
LIST(REMOVE_AT _args 0)
ENDIF("${_tmp}" STREQUAL "ALL")
ENDIF(_args)
IF(_args)
LIST(GET _args 0 _tmp)
IF("${_tmp}" STREQUAL "INSTALL_DESTINATION")
LIST(GET _args 1 _installDest )
LIST(REMOVE_AT _args 0 1)
ENDIF("${_tmp}" STREQUAL "INSTALL_DESTINATION")
ENDIF(_args)
GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
# message(STATUS "1 all ${_addToAll} dest ${_installDest} args: ${_args}")
FOREACH (_lang ${_args})
SET(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
SET(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
ADD_CUSTOM_COMMAND(
OUTPUT "${_poFile}"
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile}
DEPENDS ${_absPotFile}
)
ADD_CUSTOM_COMMAND(
OUTPUT "${_gmoFile}"
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
DEPENDS ${_absPotFile} ${_poFile}
)
IF(_installDest)
INSTALL(FILES ${_gmoFile} DESTINATION ${_installDest}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
ENDIF(_installDest)
LIST(APPEND _gmoFiles ${_gmoFile})
ENDFOREACH (_lang )
ADD_CUSTOM_TARGET(potfile ${_addToAll} DEPENDS ${_gmoFiles})
ENDMACRO(GETTEXT_PROCESS_POT_FILE)
# GETTEXT_PROCESS_PO_FILES(<lang> [ALL] [INSTALL_DESTINATION <dir>] <po1> <po2> ...)
MACRO(GETTEXT_PROCESS_PO_FILES _lang)
SET(_gmoFiles)
SET(_args ${ARGN})
SET(_addToAll)
SET(_installDest)
LIST(GET _args 0 _tmp)
IF("${_tmp}" STREQUAL "ALL")
SET(_addToAll ALL)
LIST(REMOVE_AT _args 0)
ENDIF("${_tmp}" STREQUAL "ALL")
LIST(GET _args 0 _tmp)
IF("${_tmp}" STREQUAL "INSTALL_DESTINATION")
LIST(GET _args 1 _installDest )
LIST(REMOVE_AT _args 0 1)
ENDIF("${_tmp}" STREQUAL "INSTALL_DESTINATION")
# message(STATUS "2 all ${_addToAll} dest ${_installDest} args: ${_args}")
FOREACH(_current_PO_FILE ${_args})
GET_FILENAME_COMPONENT(_name ${_current_PO_FILE} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
add_custom_command(OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
IF(_installDest)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_installDest}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
ENDIF(_installDest)
LIST(APPEND _gmoFiles ${_gmoFile})
ENDFOREACH(_current_PO_FILE)
ADD_CUSTOM_TARGET(pofiles ${_addToAll} DEPENDS ${_gmoFiles})
ENDMACRO(GETTEXT_PROCESS_PO_FILES)
#IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
# SET(GETTEXT_FOUND TRUE)
#ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
# SET(GETTEXT_FOUND FALSE)
# IF (GetText_REQUIRED)
# MESSAGE(FATAL_ERROR "GetText not found")
# ENDIF (GetText_REQUIRED)
#ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )

View file

@ -0,0 +1,60 @@
# cmake macro to test if we use gphoto2
# GPHOTO2_FOUND - system has the GPHOTO2 library
# GPHOTO2_INCLUDE_DIR - the GPHOTO2 include directory
# GPHOTO2_LIBRARIES - The libraries needed to use GPHOTO2
# Copyright (c) 2006, 2007 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.
option(KDE4_GPHOTO2 "do not build kamera (gphoto2 required)" ON)
if (KDE4_GPHOTO2 )
IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR)
# in cache already
SET(GPHOTO2_FOUND TRUE)
ELSE (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR)
FIND_PROGRAM(GHOTO2CONFIG_EXECUTABLE NAMES gphoto2-config
)
FIND_PROGRAM(GHOTO2PORTCONFIG_EXECUTABLE NAMES gphoto2-port-config
)
set(GPHOTO2_LIBRARIES)
set(GPHOTO2_INCLUDE_DIRS)
# if gphoto2-port-config and gphoto2-config have been found
IF (GHOTO2PORTCONFIG_EXECUTABLE AND GHOTO2CONFIG_EXECUTABLE)
EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2PORT_LIBRARY)
EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2_LIBRARY)
EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2PORT_RESULT_INCLUDE_DIR)
EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2_RESULT_INCLUDE_DIR)
set(GPHOTO2_LIBRARIES ${GPHOTO2PORT_LIBRARY} ${GPHOTO2_LIBRARY})
# the cflags for poppler-qt4 can contain more than one include path
separate_arguments(_GPHOTO2_RESULT_INCLUDE_DIR)
foreach(_includedir ${_GPHOTO2_RESULT_INCLUDE_DIR})
string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}")
set(GPHOTO2_INCLUDE_DIR ${GPHOTO2_INCLUDE_DIR} ${_includedir})
endforeach(_includedir)
separate_arguments(_GPHOTO2PORT_RESULT_INCLUDE_DIR)
foreach(_includedir ${_GPHOTO2PORT_RESULT_INCLUDE_DIR})
string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}")
set(GPHOTO2PORT_INCLUDE_DIR ${GPHOTO2PORT_INCLUDE_DIR} ${_includedir})
endforeach(_includedir)
set(GPHOTO2_INCLUDE_DIRS ${GPHOTO2PORT_INCLUDE_DIR} ${GPHOTO2_INCLUDE_DIR} )
endif(GHOTO2PORTCONFIG_EXECUTABLE AND GHOTO2CONFIG_EXECUTABLE)
IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS)
SET(GPHOTO2_FOUND TRUE)
message(STATUS "Found gphoto2: ${GPHOTO2_LIBRARIES}")
ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS)
ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR)
MARK_AS_ADVANCED(GPHOTO2_LIBRARIES GPHOTO2_INCLUDE_DIRS)
endif(KDE4_GPHOTO2)

View file

@ -0,0 +1,25 @@
# - Try to find HUNSPELL
# Once done this will define
#
# HUNSPELL_FOUND - system has HUNSPELL
# HUNSPELL_INCLUDE_DIR - the HUNSPELL include directory
# HUNSPELL_LIBRARIES - The libraries needed to use HUNSPELL
# HUNSPELL_DEFINITIONS - Compiler switches required for using HUNSPELL
IF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)
# Already in cache, be silent
SET(HUNSPELL_FIND_QUIETLY TRUE)
ENDIF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)
FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx )
FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2)
# handle the QUIETLY and REQUIRED arguments and set HUNSPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES)

View file

@ -0,0 +1,36 @@
# - Try to find HUPnP library
# Once done this will define
#
# HUPNP_FOUND - system has HUPnP
# HUPNP_INCLUDE_DIR - the LIBHUpnp include directory
# HUPNP_LIBS - the LIBHUpnp libraries
# HUPNP_VERSION_STRING - The version of HUpnp
# HUPNP_VERSION_MAJOR - The major version of HUpnp
# HUPNP_VERSION_MINOR - The minor version of HUpnp
# HUPNP_VERSION_PATCH - The patch version of HUpnp
#
# Copyright (c) 2010, Paulo Romulo Alves Barros <paulo.romulo@kdemail.net>
# The minimum HUpnp version we require
if(NOT HUpnp_FIND_VERSION)
set(HUpnp_FIND_VERSION "0.9.1")
endif()
find_path( HUPNP_INCLUDE_DIR HUpnpCore/HUpnp )
find_library( HUPNP_LIBS NAMES HUpnp HUpnp1 )
if( HUPNP_INCLUDE_DIR AND EXISTS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" )
file( STRINGS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" HUPNP_INFO_H REGEX "^#define HUPNP_CORE_.*_VERSION .*$" )
string( REGEX REPLACE ".*HUPNP_CORE_MAJOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MAJOR "${HUPNP_INFO_H}" )
string( REGEX REPLACE ".*HUPNP_CORE_MINOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MINOR "${HUPNP_INFO_H}" )
string( REGEX REPLACE ".*HUPNP_CORE_PATCH_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_PATCH "${HUPNP_INFO_H}" )
set( HUPNP_VERSION_STRING "${HUPNP_VERSION_MAJOR}.${HUPNP_VERSION_MINOR}.${HUPNP_VERSION_PATCH}" )
endif()
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( HUpnp REQUIRED_VARS HUPNP_INCLUDE_DIR HUPNP_LIBS
VERSION_VAR HUPNP_VERSION_STRING )
mark_as_advanced( HUPNP_INCLUDE_DIR HUPNP_LIBS )

View file

@ -0,0 +1,23 @@
# - Find IOKit on Mac
#
# IOKIT_LIBRARY - the library to use IOKit
# IOKIT_FOUND - true if IOKit has been found
# Copyright (c) 2009, Harald Fernengel <harry@kdevelop.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CMakeFindFrameworks)
cmake_find_frameworks(IOKit)
cmake_find_frameworks(CoreFoundation)
if (IOKit_FRAMEWORKS)
set(IOKIT_LIBRARY "-framework IOKit -framework CoreFoundation" CACHE FILEPATH "IOKit framework" FORCE)
set(IOKIT_FOUND 1)
endif (IOKit_FRAMEWORKS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IOKit DEFAULT_MSG IOKIT_LIBRARY)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,71 @@
# Find if we installed kdebase/workspaces.
# Once done this will define
#
# KDE4WORKSPACE_FOUND - system has KDE workspace installed
# KDE4WORKSPACE_INCLUDE_DIR - the KDE workspace include directory
#
# It also sets variables for the following libraries:
# KDE4WORKSPACE_TASKMANAGER_LIBRARY, KDE4WORKSPACE_TASKMANAGER_LIBS
# KDE4WORKSPACE_KWORKSPACE_LIBRARY, KDE4WORKSPACE_KWORKSPACE_LIBS
# KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBRARY, KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBS
# KDE4WORKSPACE_SOLIDCONTROL_LIBRARY, KDE4WORKSPACE_SOLIDCONTROL_LIBS
# KDE4WORKSPACE_PROCESSUI_LIBRARY, KDE4WORKSPACE_PROCESSUI_LIBS
# KDE4WORKSPACE_LSOFUI_LIBRARY, KDE4WORKSPACE_LSOFUI_LIBS
# KDE4WORKSPACE_PLASMACLOCK_LIBRARY, KDE4WORKSPACE_PLASMACLOCK_LIBS
# KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBS
# KDE4WORKSPACE_NEPOMUKQUERY_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERY_LIBS
# KDE4WORKSPACE_KSCREENSAVER_LIBRARY, KDE4WORKSPACE_KSCREENSAVER_LIBS
# KDE4WORKSPACE_WEATHERION_LIBRARY, KDE4WORKSPACE_WEATHERION_LIBS
# KDE4WORKSPACE_KWINEFFECTS_LIBRARY, KDE4WORKSPACE_KWINEFFECTS_LIBS
# KDE4WORKSPACE_KDECORATIONS_LIBRARY, KDE4WORKSPACE_KDECORATIONS_LIBS
# KDE4WORKSPACE_KSGRD_LIBRARY, KDE4WORKSPACE_KSGRD_LIBS
# KDE4WORKSPACE_KEPHAL_LIBRARY, KDE4WORKSPACE_KEPHAL_LIBS
#
# And the following locations:
# KDE4WORKSPACE_LIB_DIR
# KDE4WORKSPACE_LIBEXEC_DIR
# KDE4WORKSPACE_INCLUDE_DIR
# KDE4WORKSPACE_BIN_DIR
# KDE4WORKSPACE_SBIN_DIR
# KDE4WORKSPACE_DATA_DIR
# KDE4WORKSPACE_HTML_DIR
# KDE4WORKSPACE_CONFIG_DIR
# KDE4WORKSPACE_ICON_DIR
# KDE4WORKSPACE_KCFG_DIR
# KDE4WORKSPACE_LOCALE_DIR
# KDE4WORKSPACE_MIME_DIR
# KDE4WORKSPACE_SOUND_DIR
# KDE4WORKSPACE_TEMPLATES_DIR
# KDE4WORKSPACE_WALLPAPER_DIR
# KDE4WORKSPACE_KCONF_UPDATE_DIR
# KDE4WORKSPACE_AUTOSTART_DIR
# KDE4WORKSPACE_XDG_APPS_DIR
# KDE4WORKSPACE_XDG_DIRECTORY_DIR
# KDE4WORKSPACE_SYSCONF_DIR
# KDE4WORKSPACE_MAN_DIR
# KDE4WORKSPACE_INFO_DIR
# KDE4WORKSPACE_DBUS_INTERFACES_DIR
# KDE4WORKSPACE_DBUS_SERVICES_DIR
# KDE4WORKSPACE_SERVICES_DIR
# KDE4WORKSPACE_SERVICETYPES_DIR
# Copyright (c) 2008, 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.
# The find_package() call below loads the file KDE4WorkspaceConfig.cmake file.
# This file is created and installed by kdebase/workspace/CMakeLists.txt
# It contains settings for all install location of kdebase/workspace, as e.g.
# KDE4WORKSPACE_INCLUDE_DIR, and also variables for all libraries.
# See kdebase/workspace/CMakeLists.txt and kdebase/workspace/KDE4WorkspaceConfig.cmake.in
# for details. Alex
set(_KDE4Workspace_FIND_QUIETLY ${KDE4Workspace_FIND_QUIETLY})
find_package(KDE4Workspace QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KDE4Workspace/cmake )
set(KDE4Workspace_FIND_QUIETLY ${_KDE4Workspace_FIND_QUIETLY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(KDE4Workspace DEFAULT_MSG KDE4Workspace_CONFIG )

View file

@ -0,0 +1,45 @@
#
# Find the KDevelop Platform modules and sets various variables accordingly
#
# Example usage of this module:
# find_package(KDevPlatform 1.0.0 REQUIRED)
#
# The version number and REQUIRED flag are optional. You can set CMAKE_PREFIX_PATH
# variable to help it find the required files and directories
# KDEVPLATFORM_FOUND - set to TRUE if the platform was found and the version is compatible FALSE otherwise
#
# KDEVPLATFORM_VERSION - The version number of kdevplatform
# KDEVPLATFORM_VERSION_MAJOR - The major version number of kdevplatform
# KDEVPLATFORM_VERSION_MINOR - The minor version number of kdevplatform
# KDEVPLATFORM_VERSION_PATCH - The patch version number of kdevplatform
# KDEVPLATFORM_INCLUDE_DIR - include dir of the platform, for example /usr/include/kdevplatform
# KDEVPLATFORM_INTERFACES_LIBRARIES - interfaces module library
# KDEVPLATFORM_LANGUAGE_LIBRARIES - language module library
# KDEVPLATFORM_OUTPUTVIEW_LIBRARIES - outputview module library
# KDEVPLATFORM_PROJECT_LIBRARIES - project module library
# KDEVPLATFORM_SUBLIME_LIBRARIES - sublime module library
# KDEVPLATFORM_SHELL_LIBRARIES - shell module library
# KDEVPLATFORM_TESTS_LIBRARIES - library to write tests for plugins,
# contains some useful tools and a way to replace parts of Core
# classes with custom implementations
# KDEVPLATFORM_UTIL_LIBRARIES - util module library
# KDEVPLATFORM_VCS_LIBRARIES - vcs module library
# KDEVPLATFORM_DEBUGGER_LIBRARIES - debugger module library
#
# The following macros are added (from KDevPlatformMacros.cmake):
#
# KDEVPLATFORM_ADD_APP_TEMPLATES( template1 ... templateN )
# Use this to get packaged template archives for the given templates.
# Parameters should be the directories containing the templates.
#
# Copyright 2007 Andreas Pakulat <apaku@gmx.de>
# Redistribution and use is allowed according to the terms of the BSD license.
set(_KDevPlatform_FIND_QUIETLY ${KDevPlatform_FIND_QUIETLY})
find_package( KDevPlatform ${KDevPlatform_FIND_VERSION} NO_MODULE )
set(KDevPlatform_FIND_QUIETLY ${_KDevPlatform_FIND_QUIETLY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(KDevPlatform DEFAULT_MSG KDevPlatform_CONFIG )

View file

@ -0,0 +1,39 @@
# Once done this will define
#
# KNEPOMUK_FOUND - system has the Nepomuk-KDE backbone lib KNep
# KNEPOMUK_INCLUDES - the libKNep include directory
# KNEPOMUK_LIBRARIES - Link these to use libKNep
#
# Copyright (c) 2008, Sebastian Trueg, <sebastian@trueg.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(KNEPOMUK_INCLUDES AND KNEPOMUK_LIBRARIES)
set(KNepomuk_FIND_QUIETLY TRUE)
endif(KNEPOMUK_INCLUDES AND KNEPOMUK_LIBRARIES)
FIND_PATH(KNEPOMUK_INCLUDES
NAMES
knepomuk/knepomuk.h
PATHS
${KDE4_INCLUDE_DIR}
${INCLUDE_INSTALL_DIR}
)
FIND_LIBRARY(KNEPOMUK_LIBRARIES
NAMES
knepomuk
PATHS
${KDE4_LIB_DIR}
${LIB_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KNepomuk DEFAULT_MSG KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES )
MARK_AS_ADVANCED(KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES)

View file

@ -0,0 +1,157 @@
# Try to find the Kdcraw library
#
# Parameters:
# KDCRAW_LOCAL_DIR - If you have put a local version of libkdcraw into
# your source tree, set KDCRAW_LOCAL_DIR to the
# relative path from the root of your source tree
# to the libkdcraw local directory.
#
# Once done this will define
#
# KDCRAW_FOUND - System has libkdcraw
# KDCRAW_INCLUDE_DIR - The libkdcraw include directory/directories (for #include <libkdcraw/...> style)
# KDCRAW_LIBRARIES - Link these to use libkdcraw
# KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw
# KDCRAW_VERSION - Version of libkdcraw which was found
#
# Copyright (c) 2008-2014, Gilles Caulier, <caulier.gilles@gmail.com>
# Copyright (c) 2011, Michael G. Hansen, <mike@mghansen.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Kdcraw_FIND_QUIETLY and Kdcraw_FIND_REQUIRED may be defined by CMake.
if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}")
endif (NOT Kdcraw_FIND_QUIETLY)
# in cache already
set(KDCRAW_FOUND TRUE)
else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Check for Kdcraw library in local sub-folder...")
endif (NOT Kdcraw_FIND_QUIETLY)
# Check for a local version of the library.
if (KDCRAW_LOCAL_DIR)
find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH)
if (NOT KDCRAW_LOCAL_FOUND)
message(WARNING "KDCRAW_LOCAL_DIR specified as \"${KDCRAW_LOCAL_DIR}\" but libkdcraw could not be found there.")
endif (NOT KDCRAW_LOCAL_FOUND)
else (KDCRAW_LOCAL_DIR)
find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH)
if (KDCRAW_LOCAL_FOUND)
set(KDCRAW_LOCAL_DIR libkdcraw)
endif (KDCRAW_LOCAL_FOUND)
find_file(KDCRAW_LOCAL_FOUND libkdcraw/libkdcraw_export.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH)
if (KDCRAW_LOCAL_FOUND)
set(KDCRAW_LOCAL_DIR libs/libkdcraw)
endif (KDCRAW_LOCAL_FOUND)
endif (KDCRAW_LOCAL_DIR)
if (KDCRAW_LOCAL_FOUND)
# We need two include directories: because the version.h file is put into the build directory
# TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory...
set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR})
set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}")
set(KDCRAW_LIBRARIES kdcraw)
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}")
endif (NOT Kdcraw_FIND_QUIETLY)
set(KDCRAW_FOUND TRUE)
set(kdcraw_version_h_filename "${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}/libkdcraw/version.h")
else (KDCRAW_LOCAL_FOUND)
if (NOT WIN32)
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Check Kdcraw library using pkg-config...")
endif (NOT Kdcraw_FIND_QUIETLY)
# use FindPkgConfig to get the directories and then use these values
# in the find_path() and find_library() calls
include(FindPkgConfig)
pkg_check_modules(PC_KDCRAW libkdcraw)
if (PC_KDCRAW_FOUND)
# make sure the version is >= 0.2.0
# TODO: WHY?
if (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
message(STATUS "Found libkdcraw release < 0.2.0, too old")
set(KDCRAW_VERSION_GOOD_FOUND FALSE)
set(KDCRAW_FOUND FALSE)
else (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
set(KDCRAW_VERSION "${PC_KDCRAW_VERSION}")
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Found libkdcraw release ${KDCRAW_VERSION}")
endif (NOT Kdcraw_FIND_QUIETLY)
set(KDCRAW_VERSION_GOOD_FOUND TRUE)
endif (PC_KDCRAW_VERSION VERSION_LESS 0.2.0)
else (PC_KDCRAW_FOUND)
set(KDCRAW_VERSION_GOOD_FOUND FALSE)
endif (PC_KDCRAW_FOUND)
else (NOT WIN32)
# TODO: Why do we just assume the version is good?
set(KDCRAW_VERSION_GOOD_FOUND TRUE)
endif (NOT WIN32)
if (KDCRAW_VERSION_GOOD_FOUND)
set(KDCRAW_DEFINITIONS "${PC_KDCRAW_CFLAGS_OTHER}")
find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h ${PC_KDCRAW_INCLUDE_DIRS})
set(kdcraw_version_h_filename "${KDCRAW_INCLUDE_DIR}/libkdcraw/version.h")
find_library(KDCRAW_LIBRARIES NAMES kdcraw HINTS ${PC_KDCRAW_LIBRARY_DIRS})
if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
set(KDCRAW_FOUND TRUE)
else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
set(KDCRAW_FOUND FALSE)
endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES)
endif (KDCRAW_VERSION_GOOD_FOUND)
if (KDCRAW_FOUND)
if (NOT Kdcraw_FIND_QUIETLY)
message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}")
endif (NOT Kdcraw_FIND_QUIETLY)
else (KDCRAW_FOUND)
if (Kdcraw_FIND_REQUIRED)
if (NOT KDCRAW_INCLUDE_DIR)
message(FATAL_ERROR "Could NOT find libkdcraw header files.")
else(NOT KDCRAW_INCLUDE_DIR)
message(FATAL_ERROR "Could NOT find libkdcraw library.")
endif (NOT KDCRAW_INCLUDE_DIR)
endif (Kdcraw_FIND_REQUIRED)
endif (KDCRAW_FOUND)
endif (KDCRAW_LOCAL_FOUND)
if (KDCRAW_FOUND)
# Find the version information, unless that was reported by pkg_search_module.
if (NOT KDCRAW_VERSION)
file(READ "${kdcraw_version_h_filename}" kdcraw_version_h_content)
# This is the line we are trying to find: static const char kdcraw_version[] = "1.22.4-beta_5+dfsg";
string(REGEX REPLACE ".*char +kdcraw_version\\[\\] += +\"([^\"]+)\".*" "\\1" KDCRAW_VERSION "${kdcraw_version_h_content}")
unset(kdcraw_version_h_content)
endif (NOT KDCRAW_VERSION)
unset(kdcraw_version_h_filename)
endif (KDCRAW_FOUND)
if (KDCRAW_FOUND)
mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS KDCRAW_VERSION KDCRAW_FOUND)
else (KDCRAW_FOUND)
# The library was not found, reset all related variables.
unset(KDCRAW_INCLUDE_DIR)
unset(KDCRAW_LIBRARIES)
unset(KDCRAW_DEFINITIONS)
unset(KDCRAW_VERSION)
endif (KDCRAW_FOUND)
endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION)

View file

@ -0,0 +1,48 @@
# 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
# Copyright (C) 2007 Laurent Montel <montel@kde.org>
# Copyright (C) 2007 Gerd Fleischer <gerdfleischer@web.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (KDEMULTIMEDIA_INCLUDE_DIR)
# Already in cache, be silent
set(KDEMULTIMEDIA_FOUND TRUE)
endif (KDEMULTIMEDIA_INCLUDE_DIR)
find_path(KDEMULTIMEDIA_INCLUDE_DIR NAMES libkcddb/kcddb.h libkcompactdisc/kcompactdisc.h
PATHS
${INCLUDE_INSTALL_DIR}
)
find_library(KCDDB_LIBRARY NAMES kcddb
PATHS
${LIB_INSTALL_DIR}
)
find_library(KCOMPACTDISC_LIBRARY NAMES kcompactdisc
PATHS
${LIB_INSTALL_DIR}
)
# audioencoder, audiocdplugins?
set(KDEMULTIMEDIA_LIBRARIES ${KCDDB_LIBRARY} ${KCOMPACTDISC_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(KdeMultimedia DEFAULT_MSG KDEMULTIMEDIA_LIBRARIES KDEMULTIMEDIA_INCLUDE_DIR )
mark_as_advanced(KDEMULTIMEDIA_INCLUDE_DIR KDEMULTIMEDIA_LIBRARIES)

View file

@ -0,0 +1,3 @@
# Nothing should require kdepim. We'll show a fatal error and an explanation.
message(FATAL_ERROR "You must not use the FindKdepim CMake module. If you need more information about this error, please contact us on the kde-pim mailing list.")

View file

@ -0,0 +1,84 @@
# Find if we installed kdepimlibs before to compile it
# Once done this will define
#
# KdepimLibs_FOUND - system has KDE PIM Libraries
# KDEPIMLIBS_INCLUDE_DIR - the KDE PIM Libraries include directory
# KDEPIMLIBS_INCLUDE_DIRS - the KDE PIM Libraries include directory and CamelCase headers
#
# It also sets variables for the following libraries:
# KDEPIMLIBS_AKONADI_LIBS
# KDEPIMLIBS_AKONADI_CONTACT_LIBS
# KDEPIMLIBS_AKONADI_KABC_LIBS
# KDEPIMLIBS_AKONADI_KMIME_LIBS
# KDEPIMLIBS_GPGMEPP_LIBS
# KDEPIMLIBS_KABC_LIBS
# KDEPIMLIBS_KALARMCAL_LIBS
# KDEPIMLIBS_KBLOG_LIBS
# KDEPIMLIBS_KCAL_LIBS
# KDEPIMLIBS_KCALCORE_LIBS
# KDEPIMLIBS_KCALUTILS_LIBS
# KDEPIMLIBS_KHOLIDAYS_LIBS
# KDEPIMLIBS_KIMAP_LIBS
# KDEPIMLIBS_KLDAP_LIBS
# KDEPIMLIBS_KMIME_LIBS
# KDEPIMLIBS_KONTACTINTERFACE_LIBS
# KDEPIMLIBS_KPIMIDENTITIES_LIBS
# KDEPIMLIBS_KPIMTEXTEDIT_LIBS
# KDEPIMLIBS_KPIMUTILS_LIBS
# KDEPIMLIBS_KRESOURCES_LIBS
# KDEPIMLIBS_KTNEF_LIBS
# KDEPIMLIBS_KXMLRPCCLIENT_LIBS
# KDEPIMLIBS_MAILTRANSPORT_LIBS
# KDEPIMLIBS_MICROBLOG_LIBS
# KDEPIMLIBS_QGPGME_LIBS
# KDEPIMLIBS_SYNDICATION_LIBS
#
# And the following locations:
# KDEPIMLIBS_DATA_DIR
# KDEPIMLIBS_DBUS_INTERFACES_DIR
# KDEPIMLIBS_DBUS_SERVICES_DIR
# KDEPIMLIBS_INCLUDE_DIR
# KDEPIMLIBS_INCLUDE_DIRS
# KDEPIMLIBS_LIB_DIR
# KDEPIMLIBS_BIN_DIR
# KDEPIMLIBS_LIBEXEC_DIR
# KDEPIMLIBS_SBIN_DIR
# KDEPIMLIBS_HTML_DIR
# KDEPIMLIBS_CONFIG_DIR
# KDEPIMLIBS_ICON_DIR
# KDEPIMLIBS_KCFG_DIR
# KDEPIMLIBS_LOCALE_DIR
# KDEPIMLIBS_MIME_DIR
# KDEPIMLIBS_SOUND_DIR
# KDEPIMLIBS_TEMPLATES_DIR
# KDEPIMLIBS_KCONF_UPDATE_DIR
# KDEPIMLIBS_AUTOSTART_DIR
# KDEPIMLIBS_XDG_APPS_DIR
# KDEPIMLIBS_XDG_DIRECTORY_DIR
# KDEPIMLIBS_SYSCONF_DIR
# KDEPIMLIBS_MAN_DIR
# KDEPIMLIBS_INFO_DIR
# KDEPIMLIBS_SERVICES_DIR
# KDEPIMLIBS_SERVICETYPES_DIR
# Copyright (c) 2008, 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.
# The find_package() call below loads the file KdepimLibsConfig.cmake file.
# This file is created and installed by kdepimlibs/CMakeLists.txt
# It contains settings for all install location of kdepimlibs, as e.g.
# KDEPIMLIBS_INCLUDE_DIR, and also variables for all libraries.
# See kdepimlibs/CMakeLists.txt and kdepimlibs/KdepimLibsConfig.cmake.in
# for details. Alex
set(_KdepimLibs_FIND_QUIETLY ${KdepimLibs_FIND_QUIETLY})
find_package(KdepimLibs ${KdepimLibs_FIND_VERSION} QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KdepimLibs/cmake )
set(KdepimLibs_FIND_QUIETLY ${_KdepimLibs_FIND_QUIETLY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(KdepimLibs DEFAULT_MSG KdepimLibs_CONFIG )

View file

@ -0,0 +1,123 @@
# - Try to find the KExiv2 library
#
# If you have put a local version of libkexiv2 into your source tree,
# set KEXIV2_LOCAL_DIR to the relative path to the local directory.
#
# Once done this will define
#
# KEXIV2_FOUND - system has libkexiv2
# KEXIV2_INCLUDE_DIR - the libkexiv2 include directory
# KEXIV2_LIBRARIES - Link these to use libkexiv2
# KEXIV2_DEFINITIONS - Compiler switches required for using libkexiv2
#
# Copyright (c) 2008-2014, Gilles Caulier, <caulier.gilles@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS)
message(STATUS "Found Kexiv2 library in cache: ${KEXIV2_LIBRARIES}")
# in cache already
set(KEXIV2_FOUND TRUE)
else (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS)
message(STATUS "Check Kexiv2 library in local sub-folder...")
# Check if library is not in local sub-folder
if (KEXIV2_LOCAL_DIR)
set(KEXIV2_LOCAL_FOUND TRUE)
else (KEXIV2_LOCAL_DIR)
find_file(KEXIV2_LOCAL_FOUND libkexiv2/libkexiv2_export.h ${CMAKE_SOURCE_DIR}/libkexiv2 ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH)
if (KEXIV2_LOCAL_FOUND)
# Was it found in libkexiv2/ or in libs/libkexiv2?
find_file(KEXIV2_LOCAL_FOUND_IN_LIBS libkexiv2/libkexiv2_export.h ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH)
if (KEXIV2_LOCAL_FOUND_IN_LIBS)
set(KEXIV2_LOCAL_DIR libs/libkexiv2)
else (KEXIV2_LOCAL_FOUND_IN_LIBS)
set(KEXIV2_LOCAL_DIR libkexiv2)
endif (KEXIV2_LOCAL_FOUND_IN_LIBS)
endif (KEXIV2_LOCAL_FOUND)
endif (KEXIV2_LOCAL_DIR)
if (KEXIV2_LOCAL_FOUND)
# we need two include directories: because the version.h file is put into the build directory
# TODO KEXIV2_INCLUDE_DIR sounds like it should contain only one directory...
set(KEXIV2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR})
set(KEXIV2_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR}")
set(KEXIV2_LIBRARIES kexiv2)
message(STATUS "Found Kexiv2 library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}")
set(KEXIV2_FOUND TRUE)
mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS)
else(KEXIV2_LOCAL_FOUND)
if(NOT WIN32)
message(STATUS "Check Kexiv2 library using pkg-config...")
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
include(UsePkgConfig)
PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags)
if(_KEXIV2LinkFlags)
# query pkg-config asking for a libkexiv2 >= 0.2.0
exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
if(_return_VALUE STREQUAL "0")
message(STATUS "Found libkexiv2 release >= 0.2.0")
set(KEXIV2_VERSION_GOOD_FOUND TRUE)
else(_return_VALUE STREQUAL "0")
message(STATUS "Found libkexiv2 release < 0.2.0, too old")
set(KEXIV2_VERSION_GOOD_FOUND FALSE)
set(KEXIV2_FOUND FALSE)
endif(_return_VALUE STREQUAL "0")
else(_KEXIV2LinkFlags)
set(KEXIV2_VERSION_GOOD_FOUND FALSE)
set(KEXIV2_FOUND FALSE)
endif(_KEXIV2LinkFlags)
else(NOT WIN32)
set(KEXIV2_VERSION_GOOD_FOUND TRUE)
endif(NOT WIN32)
if(KEXIV2_VERSION_GOOD_FOUND)
set(KEXIV2_DEFINITIONS "${_KEXIV2Cflags}")
find_path(KEXIV2_INCLUDE_DIR libkexiv2/version.h
${_KEXIV2IncDir}
)
find_library(KEXIV2_LIBRARIES NAMES kexiv2
PATHS
${_KEXIV2LinkDir}
)
if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES)
set(KEXIV2_FOUND TRUE)
endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES)
endif(KEXIV2_VERSION_GOOD_FOUND)
if (KEXIV2_FOUND)
if (NOT Kexiv2_FIND_QUIETLY)
message(STATUS "Found libkexiv2: ${KEXIV2_LIBRARIES}")
endif (NOT Kexiv2_FIND_QUIETLY)
else (KEXIV2_FOUND)
if (Kexiv2_FIND_REQUIRED)
if (NOT KEXIV2_INCLUDE_DIR)
message(FATAL_ERROR "Could NOT find libkexiv2 header files")
endif (NOT KEXIV2_INCLUDE_DIR)
if (NOT KEXIV2_LIBRARIES)
message(FATAL_ERROR "Could NOT find libkexiv2 library")
endif (NOT KEXIV2_LIBRARIES)
endif (Kexiv2_FIND_REQUIRED)
endif (KEXIV2_FOUND)
mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS)
endif(KEXIV2_LOCAL_FOUND)
endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS)

Some files were not shown because too many files have changed in this diff Show more