mirror of https://github.com/freetype/freetype
[cmake] Make `FindHarfbuzz' observe the REQUIRED option.
* builds/cmake/FindHarfBuzz.cmake: Implement it.
This commit is contained in:
parent
5b3446b012
commit
4854df62f7
|
@ -1,3 +1,9 @@
|
|||
2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
|
||||
|
||||
[cmake] Make `FindHarfbuzz' observe the REQUIRED option.
|
||||
|
||||
* builds/cmake/FindHarfBuzz.cmake: Implement it.
|
||||
|
||||
2015-11-27 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cmake] Collect files specific to cmake in `builds/cmake'.
|
||||
|
|
|
@ -44,15 +44,26 @@ find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
|
|||
|
||||
# HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
|
||||
if ("${PC_HARFBUZZ_VERSION}" VERSION_GREATER "0.9.17")
|
||||
pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 REQUIRED)
|
||||
if (HarfBuzz_FIND_REQUIRED)
|
||||
set(_HARFBUZZ_REQUIRED REQUIRED)
|
||||
else ()
|
||||
set(_HARFBUZZ_REQUIRED "")
|
||||
endif ()
|
||||
pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 ${_HARFBUZZ_REQUIRED})
|
||||
find_library(HARFBUZZ_ICU_LIBRARIES NAMES harfbuzz-icu
|
||||
HINTS ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} ${PC_HARFBUZZ_ICU_LIBDIR}
|
||||
)
|
||||
list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
|
||||
if (HARFBUZZ_ICU_LIBRARIES)
|
||||
list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
|
||||
endif ()
|
||||
set(_HARFBUZZ_EXTRA_REQUIRED_VAR "HARFBUZZ_ICU_LIBRARIES")
|
||||
else ()
|
||||
set(_HARFBUZZ_EXTRA_REQUIRED_VAR "")
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS
|
||||
HARFBUZZ_LIBRARIES ${_HARFBUZZ_EXTRA_REQUIRED_VAR})
|
||||
|
||||
mark_as_advanced(
|
||||
HARFBUZZ_ICU_LIBRARIES
|
||||
|
|
Loading…
Reference in New Issue