mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00

now the BSD workaround is needed only for CMake to not fail to find packages from the modules it provides, not for the modules Katie provides Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
31 lines
937 B
CMake
31 lines
937 B
CMake
# - Try to find Fontconfig
|
|
# Once done this will define
|
|
#
|
|
# FONTCONFIG_FOUND - system has Fontconfig
|
|
# FONTCONFIG_INCLUDES - the Fontconfig include directory
|
|
# FONTCONFIG_LIBRARIES - the libraries needed to use Fontconfig
|
|
#
|
|
# Copyright (c) 2015-2020, Ivailo Monev, <xakepa10@gmail.com>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
include(FindPkgConfig)
|
|
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
|
|
|
|
find_path(FONTCONFIG_INCLUDES
|
|
NAMES fontconfig/fontconfig.h
|
|
HINTS $ENV{FONTCONFIGDIR}/include ${PC_FONTCONFIG_INCLUDEDIR}
|
|
)
|
|
|
|
find_library(FONTCONFIG_LIBRARIES
|
|
NAMES fontconfig
|
|
HINTS $ENV{FONTCONFIGDIR}/lib ${PC_FONTCONFIG_LIBDIR}
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(Fontconfig
|
|
VERSION_VAR PC_FONTCONFIG_VERSION
|
|
REQUIRED_VARS FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDES
|
|
)
|
|
|
|
mark_as_advanced(FONTCONFIG_INCLUDES FONTCONFIG_LIBRARIES)
|