1# - Find FontConfig library
2# Find the FontConfig includes and library
3# This module defines
4#  FONTCONFIG_INCLUDE_DIR, where to find fontconfig.h
5#  FONTCONFIG_LIBRARIES, libraries to link against to use the FontConfig API.
6#  FONTCONFIG_FOUND, If false, do not try to use FontConfig.
7
8#=============================================================================
9# Copyright 2012 Kitware, Inc.
10#
11# Distributed under the OSI-approved BSD License (the "License");
12# see accompanying file Copyright.txt for details.
13#
14# This software is distributed WITHOUT ANY WARRANTY; without even the
15# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16# See the License for more information.
17#=============================================================================
18# (To distribute this file outside of VTK, substitute the full
19#  License text for the above reference.)
20
21find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h)
22
23find_library(FONTCONFIG_LIBRARY NAMES fontconfig)
24
25# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
26# all listed variables are TRUE
27include(FindPackageHandleStandardArgs)
28find_package_handle_standard_args(FontConfig DEFAULT_MSG
29  FONTCONFIG_LIBRARY  FONTCONFIG_INCLUDE_DIR)
30
31if(FONTCONFIG_FOUND)
32  set( FONTCONFIG_LIBRARIES ${FONTCONFIG_LIBRARY} )
33endif()
34
35mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARY FONTCONFIG_LIBRARIES)
36