~ubuntu-branches/ubuntu/saucy/emscripten/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/poppler/cmake/modules/FindFontconfig.cmake

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Try to find the  Fontconfig
 
2
# Once done this will define
 
3
#
 
4
#  FONTCONFIG_FOUND - system has Fontconfig
 
5
#  FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
 
6
#  FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
 
7
#  FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
 
8
 
 
9
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
 
10
#
 
11
# Redistribution and use is allowed according to the terms of the BSD license.
 
12
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
13
 
 
14
 
 
15
if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
 
16
 
 
17
  # in cache already
 
18
  set(FONTCONFIG_FOUND TRUE)
 
19
 
 
20
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
 
21
 
 
22
  if (NOT WIN32)
 
23
    # use pkg-config to get the directories and then use these values
 
24
    # in the FIND_PATH() and FIND_LIBRARY() calls
 
25
    find_package(PkgConfig)
 
26
    pkg_check_modules(PC_FONTCONFIG fontconfig)
 
27
 
 
28
    set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
 
29
  endif (NOT WIN32)
 
30
 
 
31
  find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
 
32
    PATHS
 
33
    ${PC_FONTCONFIG_INCLUDEDIR}
 
34
    ${PC_FONTCONFIG_INCLUDE_DIRS}
 
35
    /usr/X11/include
 
36
  )
 
37
 
 
38
  find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
 
39
    PATHS
 
40
    ${PC_FONTCONFIG_LIBDIR}
 
41
    ${PC_FONTCONFIG_LIBRARY_DIRS}
 
42
  )
 
43
 
 
44
  include(FindPackageHandleStandardArgs)
 
45
  FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
 
46
  
 
47
  mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
 
48
 
 
49
endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
 
50