blob: c539d970e442bd990590ad53bea6725531575167 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# FindHarfBuzz
# ------------
#
# Find the HarfBuzz text shaping engine includes and library.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# This module defines the following :prop_tgt:`IMPORTED` target:
#
# ``HarfBuzz::HarfBuzz``
# The Harfbuzz ``harfbuzz`` library, if found
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project:
#
# ``HarfBuzz_FOUND``
# true if the HarfBuzz headers and libraries were found
# ``HarfBuzz_INCLUDE_DIRS``
# directories containing the Harfbuzz headers.
# ``HarfBuzz_LIBRARIES``
# the library to link against
find_path(HarfBuzz_INCLUDE_DIR
NAMES harfbuzz/hb.h
)
find_library(HarfBuzz_LIBRARY
NAMES harfbuzz libharfbuzz
)
# set the user variables
set(HarfBuzz_LIBRARIES "${HarfBuzz_LIBRARY}")
set(HarfBuzz_LIBRARIES ${HarfBuzz_LIBRARY})
set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HarfBuzz
DEFAULT_MSG
HarfBuzz_LIBRARY HarfBuzz_INCLUDE_DIR)
mark_as_advanced(HarfBuzz_INCLUDE_DIR HarfBuzz_LIBRARY)
if(HarfBuzz_FOUND AND NOT TARGET HarfBuzz::HarfBuzz)
add_library(HarfBuzz::HarfBuzz UNKNOWN IMPORTED)
set_target_properties(HarfBuzz::HarfBuzz PROPERTIES
IMPORTED_LOCATION "${HarfBuzz_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_INCLUDE_DIRS}")
endif()
|