aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-01-09 16:43:35 +0000
committerAlexander Neundorf <neundorf@kde.org>2007-01-09 16:43:35 +0000
commit65284aaaff202da2fa98db35b1e1b89dea8c52dd (patch)
treec1f7fc56c971b23240511d2c07cbb0cb14f8407b
parentcea260a3a7ab42cc40fd112904f619528f5fe512 (diff)
downloadextra-cmake-modules-65284aaaff202da2fa98db35b1e1b89dea8c52dd.tar.gz
extra-cmake-modules-65284aaaff202da2fa98db35b1e1b89dea8c52dd.tar.bz2
-/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
-rw-r--r--modules/FindFontconfig.cmake28
1 files changed, 13 insertions, 15 deletions
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, <montel@kde.org>
#
# 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)