From 132d93f0d7376e149876bcfa189c5635f5360ae4 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 20 Jul 2006 13:37:07 +0000 Subject: Now into kdelibs as kdebase and koffice use them svn path=/trunk/KDE/kdelibs/; revision=564569 --- modules/FindFontconfig.cmake | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 modules/FindFontconfig.cmake (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake new file mode 100644 index 00000000..541b20d8 --- /dev/null +++ b/modules/FindFontconfig.cmake @@ -0,0 +1,55 @@ +# - Try to find the Fontconfig +# Once done this will define +# +# FONTCONFIG_FOUND - system has Fontconfig +# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG +# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG +# + +if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) + + # in cache already + set(FONTCONFIG_FOUND TRUE) + +else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + + PKGCONFIG(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) + + set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig") + + find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h + PATHS + ${_FONTCONFIGIncDir} + /usr/include + /usr/local/include + /usr/X11/include + ) + + find_library(FONTCONFIG_LIBRARIES NAMES fontconfig + PATHS + ${_FONTCONFIGLinkDir} + /usr/lib + /usr/local/lib + ) + + if (FONTCONFIG_LIBRARIES) + set(FONTCONFIG_FOUND TRUE) + endif (FONTCONFIG_LIBRARIES) + + if (FONTCONFIG_FOUND) + if (NOT FONTCONFIG_FIND_QUIETLY) + message(STATUS "Found FONTCONFIG: ${FONTCONFIG_LIBRARIES}") + endif (NOT FONTCONFIG_FIND_QUIETLY) + else (FONTCONFIG_FOUND) + if (FONTCONFIG_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find FONTCONFIG") + endif (FONTCONFIG_FIND_REQUIRED) + endif (FONTCONFIG_FOUND) + + MARK_AS_ADVANCED(FONTCONFIG_LIBRARIES) + +endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) -- cgit v1.2.1 From c778596920e0d5357f216c885e35b4f97d371a23 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Sep 2006 10:18:35 +0000 Subject: added copyright notice everywhere. Now they all are BSD-licensed, as copyright holder I inserted everywhere the one who added it to svn (or Kitware if it is an enhanced copy from taken cmake) Some developers committed quite often but were not the ones who added the file, if you feel you have also copyright on the file add your name in the specific file. Copyright holders: CCMAIL: montel@kde.org CCMAIL: toscano.pino@tiscali.it CCMAIL: adymo@kdevelop.org CCMAIL: ranger@befunk.com CCMAIL: zack@kde.org CCMAIL: caslav.ilic@gmx.net CCMAIL: syntheticpp@yahoo.com CCMAIL: js@iidea.pl CCMAIL: michael.larouche@kdemail.net CCMAIL: ossi@kde.org CCMAIL: faure@kde.org Committers, but no files added so that they are not listed as copyright holders: CCMAIL: ch.ehrlicher@gmx.de CCMAIL: winter@kde.org CCMAIL: ralf.habacker@freenet.de CCMAIL: moura@kdewebdev.org CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdelibs/; revision=582410 --- modules/FindFontconfig.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 541b20d8..3f588479 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -5,6 +5,11 @@ # FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG # FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG # +# Copyright (c) 2006, Laurent Montel, +# +# 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_DEFINITIONS) -- cgit v1.2.1 From 491b73d5a0712517b0be22ef7657b91a078ec08c Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 20 Nov 2006 09:34:10 +0000 Subject: Don't try to use pkg-config under Windows svn path=/trunk/KDE/kdelibs/; revision=606389 --- modules/FindFontconfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 3f588479..f90c3b32 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -17,7 +17,7 @@ if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) set(FONTCONFIG_FOUND TRUE) else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) - +IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls INCLUDE(UsePkgConfig) @@ -25,7 +25,7 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) PKGCONFIG(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig") - +ENDIF (NOT WIN32) find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h PATHS ${_FONTCONFIGIncDir} -- cgit v1.2.1 From 65284aaaff202da2fa98db35b1e1b89dea8c52dd Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 9 Jan 2007 16:43:35 +0000 Subject: -/usr/include, /usr/local/include, /usr/lib and /usr/local/lib are not required anymore since cmake 2.4.0 or so -some cosmetics -> all the same (lower) case Alex svn path=/trunk/KDE/kdelibs/; revision=621732 --- modules/FindFontconfig.cmake | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index f90c3b32..e4579f95 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -4,7 +4,7 @@ # FONTCONFIG_FOUND - system has Fontconfig # FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG # FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG -# + # Copyright (c) 2006, Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. @@ -17,28 +17,26 @@ if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) set(FONTCONFIG_FOUND TRUE) else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) - - PKGCONFIG(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) - - set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig") -ENDIF (NOT WIN32) + + if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + include(UsePkgConfig) + + pkgconfig(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) + + set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig") + endif (NOT WIN32) + find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h PATHS ${_FONTCONFIGIncDir} - /usr/include - /usr/local/include /usr/X11/include ) find_library(FONTCONFIG_LIBRARIES NAMES fontconfig PATHS ${_FONTCONFIGLinkDir} - /usr/lib - /usr/local/lib ) if (FONTCONFIG_LIBRARIES) @@ -55,6 +53,6 @@ ENDIF (NOT WIN32) endif (FONTCONFIG_FIND_REQUIRED) endif (FONTCONFIG_FOUND) - MARK_AS_ADVANCED(FONTCONFIG_LIBRARIES) + mark_as_advanced(FONTCONFIG_LIBRARIES) endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) -- cgit v1.2.1 From 493108fe1e7d05e942f3344b9561d9534e80196b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 9 Jan 2007 16:53:22 +0000 Subject: use FONTCONFIG_INCLUDE_DIR instead of FONTCONFIG_DEFINITIONS Alex svn path=/trunk/KDE/kdelibs/; revision=621735 --- modules/FindFontconfig.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index e4579f95..8bb9750e 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -11,12 +11,12 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) +if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) # in cache already set(FONTCONFIG_FOUND TRUE) -else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) +else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) if (NOT WIN32) # use pkg-config to get the directories and then use these values @@ -55,4 +55,4 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) mark_as_advanced(FONTCONFIG_LIBRARIES) -endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS) +endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) -- cgit v1.2.1 From 5815e6f7db212468a766c03db7f4ec7316ef9ba2 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 9 Jan 2007 17:24:48 +0000 Subject: also check FONTCONFIG_INCLUDE_DIR Alex svn path=/trunk/KDE/kdelibs/; revision=621742 --- modules/FindFontconfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 8bb9750e..14ae7a98 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -39,9 +39,9 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) ${_FONTCONFIGLinkDir} ) - if (FONTCONFIG_LIBRARIES) + if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) set(FONTCONFIG_FOUND TRUE) - endif (FONTCONFIG_LIBRARIES) + endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) if (FONTCONFIG_FOUND) if (NOT FONTCONFIG_FIND_QUIETLY) -- cgit v1.2.1 From 363b00645449dfa42b9a1b7a2a68029150123948 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 14 Mar 2007 17:06:43 +0000 Subject: Fix display message svn path=/trunk/KDE/kdelibs/; revision=642545 --- modules/FindFontconfig.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 14ae7a98..791d05ea 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -44,13 +44,13 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) if (FONTCONFIG_FOUND) - if (NOT FONTCONFIG_FIND_QUIETLY) + if (NOT Fontconfig_FIND_QUIETLY) message(STATUS "Found FONTCONFIG: ${FONTCONFIG_LIBRARIES}") - endif (NOT FONTCONFIG_FIND_QUIETLY) + endif (NOT Fontconfig_FIND_QUIETLY) else (FONTCONFIG_FOUND) - if (FONTCONFIG_FIND_REQUIRED) + if (Fontconfig_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find FONTCONFIG") - endif (FONTCONFIG_FIND_REQUIRED) + endif (Fontconfig_FIND_REQUIRED) endif (FONTCONFIG_FOUND) mark_as_advanced(FONTCONFIG_LIBRARIES) -- cgit v1.2.1 From a0ac74e03721c2b1441a733d57377f177ceff7a3 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 20 Aug 2007 06:51:13 +0000 Subject: Use FIND_PACKAGE_HANDLE_STANDARD_ARGS Fix typo svn path=/trunk/KDE/kdelibs/; revision=702150 --- modules/FindFontconfig.cmake | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 791d05ea..10408b12 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -5,7 +5,7 @@ # FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG # FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG -# Copyright (c) 2006, Laurent Montel, +# Copyright (c) 2006,2007 Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -39,20 +39,9 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) ${_FONTCONFIGLinkDir} ) - if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) - set(FONTCONFIG_FOUND TRUE) - endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) - - if (FONTCONFIG_FOUND) - if (NOT Fontconfig_FIND_QUIETLY) - message(STATUS "Found FONTCONFIG: ${FONTCONFIG_LIBRARIES}") - endif (NOT Fontconfig_FIND_QUIETLY) - else (FONTCONFIG_FOUND) - if (Fontconfig_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find FONTCONFIG") - endif (Fontconfig_FIND_REQUIRED) - endif (FONTCONFIG_FOUND) - - mark_as_advanced(FONTCONFIG_LIBRARIES) + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR ) + + mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) -- cgit v1.2.1 From 774a92f000c11eb7fc6d4d0032596d35b0c27de4 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Thu, 23 Aug 2007 22:14:18 +0000 Subject: unbreak checks svn path=/trunk/KDE/kdelibs/; revision=704013 --- modules/FindFontconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 10408b12..c6a8c6ab 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -40,7 +40,7 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) ) include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR ) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR ) mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) -- cgit v1.2.1 From 9215cdab458b5fdc16343157dacd78ef82245ae1 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 16 Apr 2008 20:37:25 +0000 Subject: don't put set variables into the CACHE, per Brad King svn path=/trunk/KDE/kdelibs/; revision=797757 --- modules/FindFontconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index c6a8c6ab..ad144e1e 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -25,7 +25,7 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) pkgconfig(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) - set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig") + set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags}) endif (NOT WIN32) find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h -- cgit v1.2.1 From b5e40c83de2228ec706923ed9e9d98951d95ef2f Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 11 Nov 2008 10:38:09 +0000 Subject: Port to PKG_CHECK_MODULES svn path=/trunk/KDE/kdelibs/; revision=882701 --- modules/FindFontconfig.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index ad144e1e..a2a13afc 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -21,22 +21,21 @@ 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 - include(UsePkgConfig) + include(FindPkgConfig) + PKG_CHECK_MODULES(FONTCONFIG fontconfig) - pkgconfig(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags) - - set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags}) + set(FONTCONFIG_DEFINITIONS ${FONTCONFIG_CFLAGS}) endif (NOT WIN32) find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h PATHS - ${_FONTCONFIGIncDir} + ${FONTCONFIG_INCLUDE_DIRS} /usr/X11/include ) find_library(FONTCONFIG_LIBRARIES NAMES fontconfig PATHS - ${_FONTCONFIGLinkDir} + ${FONTCONFIG_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) @@ -45,3 +44,4 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) + -- cgit v1.2.1 From 414cdd4294be121c798099210f7fb94ad5beb70d Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 11 Nov 2008 11:45:42 +0000 Subject: Minor fix svn path=/trunk/KDE/kdelibs/; revision=882730 --- modules/FindFontconfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index a2a13afc..10fd0734 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -21,8 +21,8 @@ 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 - include(FindPkgConfig) - PKG_CHECK_MODULES(FONTCONFIG fontconfig) + find_package(PkgConfig) + pkg_check_modules(FONTCONFIG fontconfig) set(FONTCONFIG_DEFINITIONS ${FONTCONFIG_CFLAGS}) endif (NOT WIN32) -- cgit v1.2.1 From c379d4c4e0655fac2dadd4be57e2e5cd23d40572 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 2 Dec 2008 21:49:01 +0000 Subject: -rework all uses of find_package(PkgConfig)/pkg_check_modules(): the prefix used for pkgconfig config (e.g. SQLITE) now *always* gets an additional "PC_" prefix, so the prefix used for pkgconfig is now "PC_SQLITE_". This avoids name clashes between variables defined by the pkgconfig macro and the find module and unwanted effects. *Never* use the _CFLAGS coming from pkgconfig, but always CFLAGS_OTHER, since these shouldn't contain the include directories. If the include directories would be in the DEFINITIONS variable this could clash with the results of find_path() for finding include dirs. *Always* use both foo_INCLUDEDIR, foo_INCLUDE_DIRS for searching the include dir, and also both foo_LIBDIR and foo_LIBRARY_DIRS for searching the libraries. These directories coming from pkgconfig are *never* used exclusively, but *always* additionally to the standard search dirs, either before them (then using the "HINTS" keyword) or after them (then using the "PATHS" keyword) I hope I didn't break (too much) stuff. At least on my system it all seems to work the same way as it did before, with and without pkgconfig. Alex svn path=/trunk/KDE/kdelibs/; revision=891805 --- modules/FindFontconfig.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 10fd0734..268a61ae 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -2,6 +2,7 @@ # 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 @@ -22,20 +23,22 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) # 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(FONTCONFIG fontconfig) + pkg_check_modules(PC_FONTCONFIG fontconfig) - set(FONTCONFIG_DEFINITIONS ${FONTCONFIG_CFLAGS}) + set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) endif (NOT WIN32) find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h PATHS - ${FONTCONFIG_INCLUDE_DIRS} + ${PC_FONTCONFIG_INCLUDEDIR} + ${PC_FONTCONFIG_INCLUDE_DIRS} /usr/X11/include ) find_library(FONTCONFIG_LIBRARIES NAMES fontconfig PATHS - ${FONTCONFIG_LIBRARY_DIRS} + ${PC_FONTCONFIG_LIBDIR} + ${PC_FONTCONFIG_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) -- cgit v1.2.1 From ac954219018fac1c1cae99b6e69be9438e452233 Mon Sep 17 00:00:00 2001 From: David Jarvie Date: Wed, 11 Mar 2009 22:39:22 +0000 Subject: Suppress 'not found' messages from pkgconfig when the module subsequently attempts to locate the package by other means. svn path=/trunk/KDE/kdelibs/; revision=938476 --- modules/FindFontconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 268a61ae..5e2f3ead 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -23,7 +23,7 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) # 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 fontconfig) + pkg_check_modules(PC_FONTCONFIG QUIET fontconfig) set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) endif (NOT WIN32) -- cgit v1.2.1 From 4051cfa096f4fa11e6cea0950970e741140cdd0d Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 24 Aug 2010 20:05:51 +0000 Subject: -use consistent casing within each file, remove unnecessary checks Alex svn path=/trunk/KDE/kdelibs/; revision=1167513 --- modules/FindFontconfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindFontconfig.cmake') diff --git a/modules/FindFontconfig.cmake b/modules/FindFontconfig.cmake index 5e2f3ead..d95e46b4 100644 --- a/modules/FindFontconfig.cmake +++ b/modules/FindFontconfig.cmake @@ -42,8 +42,8 @@ else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) ) include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR ) - + 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) -- cgit v1.2.1