katie/cmake/modules/FindHarfBuzz.cmake

40 lines
953 B
CMake
Raw Normal View History

# - Try to find HarfBuzz
# Once done this will define
#
# HARFBUZZ_FOUND - system has HarfBuzz
# HARFBUZZ_INCLUDES - the HarfBuzz include directory
# HARFBUZZ_LIBRARIES - The libraries needed to use HarfBuzz
#
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
if(HARFBUZZ_INCLUDES AND HARFBUZZ_LIBRARIES)
set(HARFBUZZ_FIND_QUIETLY TRUE)
endif()
find_path(HARFBUZZ_INCLUDES
NAMES
hb.h
PATH_SUFFIXES harfbuzz
HINTS
$ENV{HARFBUZZDIR}/include
/usr/include
/usr/local/include
${INCLUDE_INSTALL_DIR}
)
find_library(HARFBUZZ_LIBRARIES
harfbuzz
HINTS
$ENV{HARFBUZZDIR}/lib
/usr/lib
/usr/local/lib
${LIB_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDES HARFBUZZ_LIBRARIES)
mark_as_advanced(HARFBUZZ_INCLUDES HARFBUZZ_LIBRARIES)