2020-08-11 22:20:33 +02:00
|
|
|
set(_harfbuzz_libdir "@libdir@")
|
|
|
|
set(_harfbuzz_includedir "@includedir@")
|
|
|
|
|
|
|
|
# Extract version information from libtool.
|
|
|
|
set(_harfbuzz_version_info "@HB_LIBTOOL_VERSION_INFO@")
|
|
|
|
string(REPLACE ":" ";" _harfbuzz_version_info "${_harfbuzz_version_info}")
|
|
|
|
list(GET _harfbuzz_version_info 0
|
|
|
|
_harfbuzz_current)
|
|
|
|
list(GET _harfbuzz_version_info 1
|
|
|
|
_harfbuzz_revision)
|
|
|
|
list(GET _harfbuzz_version_info 2
|
|
|
|
_harfbuzz_age)
|
|
|
|
unset(_harfbuzz_version_info)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
set(_harfbuzz_lib_suffix ".0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
|
|
|
elseif (UNIX)
|
|
|
|
set(_harfbuzz_lib_suffix "${CMAKE_SHARED_LIBRARY_SUFFIX}.0.${_harfbuzz_current}.${_harfbuzz_revision}")
|
|
|
|
else ()
|
|
|
|
# Unsupported.
|
|
|
|
set(harfbuzz_FOUND 0)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
# Add the libraries.
|
|
|
|
add_library(harfbuzz::harfbuzz SHARED IMPORTED)
|
|
|
|
set_target_properties(harfbuzz::harfbuzz PROPERTIES
|
2022-10-26 20:49:52 +02:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_includedir}/harfbuzz"
|
|
|
|
IMPORTED_LOCATION "${_harfbuzz_libdir}/libharfbuzz${_harfbuzz_lib_suffix}")
|
2020-08-11 22:20:33 +02:00
|
|
|
|
|
|
|
add_library(harfbuzz::icu SHARED IMPORTED)
|
|
|
|
set_target_properties(harfbuzz::icu PROPERTIES
|
2022-10-26 20:49:52 +02:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_includedir}/harfbuzz"
|
2020-08-11 22:20:33 +02:00
|
|
|
INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
|
2022-10-26 20:49:52 +02:00
|
|
|
IMPORTED_LOCATION "${_harfbuzz_libdir}/libharfbuzz-icu${_harfbuzz_lib_suffix}")
|
2020-08-11 22:20:33 +02:00
|
|
|
|
|
|
|
add_library(harfbuzz::subset SHARED IMPORTED)
|
|
|
|
set_target_properties(harfbuzz::subset PROPERTIES
|
2022-10-26 20:49:52 +02:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_includedir}/harfbuzz"
|
2020-08-11 22:20:33 +02:00
|
|
|
INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
|
2022-10-26 20:49:52 +02:00
|
|
|
IMPORTED_LOCATION "${_harfbuzz_libdir}/libharfbuzz-subset${_harfbuzz_lib_suffix}")
|
2020-08-11 22:20:33 +02:00
|
|
|
|
|
|
|
# Only add the gobject library if it was built.
|
|
|
|
set(_harfbuzz_have_gobject "@have_gobject@")
|
|
|
|
if (_harfbuzz_have_gobject)
|
|
|
|
add_library(harfbuzz::gobject SHARED IMPORTED)
|
|
|
|
set_target_properties(harfbuzz::gobject PROPERTIES
|
2022-10-26 20:49:52 +02:00
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_includedir}/harfbuzz"
|
2020-08-11 22:20:33 +02:00
|
|
|
INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
|
2022-10-26 20:49:52 +02:00
|
|
|
IMPORTED_LOCATION "${_harfbuzz_libdir}/libharfbuzz-gobject${_harfbuzz_lib_suffix}")
|
2020-08-11 22:20:33 +02:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
# Clean out variables we used in our scope.
|
|
|
|
unset(_harfbuzz_lib_suffix)
|
|
|
|
unset(_harfbuzz_current)
|
|
|
|
unset(_harfbuzz_revision)
|
|
|
|
unset(_harfbuzz_age)
|
|
|
|
unset(_harfbuzz_includedir)
|
|
|
|
unset(_harfbuzz_libdir)
|