vcpkg/ports/harfbuzz/harfbuzzConfig.cmake.in
Stefano Sinigardi 401578455f
[OpenCV] upgrade to v4.5.5 (#22801)
* [OpenCV4] update to v4.5.5

* [OpenCV] bump version

* [gstreamer] fix build for opencv

* fix references

* [vcpkg-tool-meson] fix nuget packaging

* fix references

* [gstreamer] fix references

* [ogre] update vcpkg tools

* fix references

* [OpenCV4] fixes from CI runs

* fix references

* [OpenCV4] force python module also in debug builds

* fix references

* [harfbuzz] fix cmake config

* harfbuzz fixes

* fix references

* [OpenCV4] remove unnecessary lines from patches

* fix references

* fix references

* [harfbuzz] bump version

* [harfbuzz] fix for single config builds

* fix references

* freetype fixes

* fix references

* fix ogre references

* fix references, again

* python when building static windows opencv libraries is unsupported

* fix references

* fix

* refs

* use required when necessary

* fix references

* do not use config for hdf5, use internal module

* fix references

* use proper spelling for freetype config cmake

* fix references

* [OpenCV] restore versions after merge

* fix references

* [leptonica] fix building

* fix references

* do not require package in optional features

* £fix references

* fix python feat

* update version

* update version

* [ffmpeg] remove opengl feat on arm64-windows

* format manifest

* fix references

* fix cuda/nvidia features compatibility matrix

* fix manifest

* fix

* fix

* fix references

* fix references, again

* move CONTROL to manifest

* [gstreamer] bump versions

* fix references

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
2022-02-23 11:57:13 -08:00

72 lines
3.0 KiB
CMake

# For old projects where the minimum CMake version is lower than 3.3.
cmake_policy(SET CMP0057 NEW)
include(CMakeFindDependencyMacro)
if(TARGET harfbuzz)
return()
endif()
add_library(harfbuzz INTERFACE IMPORTED GLOBAL)
add_library(harfbuzz::harfbuzz ALIAS harfbuzz)
find_library(HARFBUZZ_LIBRARY_DEBUG NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(HARFBUZZ_LIBRARY_DEBUG)
target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${HARFBUZZ_LIBRARY_DEBUG}>)
endif()
find_library(HARFBUZZ_LIBRARY_RELEASE NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${HARFBUZZ_LIBRARY_RELEASE}>)
set(HARFBUZZ_FEATURES @FEATURES@)
if(APPLE)
find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
target_link_libraries(harfbuzz INTERFACE ${APPLICATIONSERVICES_LIBRARY})
endif()
find_dependency(freetype CONFIG)
target_link_libraries(harfbuzz INTERFACE freetype)
if ("graphite2" IN_LIST HARFBUZZ_FEATURES)
find_library(GRAPHITE2_LIBRARY_DEBUG NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(GRAPHITE2_LIBRARY_DEBUG)
target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${GRAPHITE2_LIBRARY_DEBUG}>)
endif()
find_library(GRAPHITE2_LIBRARY_RELEASE NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(GRAPHITE2_LIBRARY_RELEASE)
target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${GRAPHITE2_LIBRARY_RELEASE}>)
endif()
endif()
if ("glib" IN_LIST HARFBUZZ_FEATURES)
find_library(GLIB_LIBRARY_DEBUG NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(GLIB_LIBRARY_DEBUG)
target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${GLIB_LIBRARY_DEBUG}>)
endif()
find_library(GLIB_LIBRARY_RELEASE NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(GLIB_LIBRARY_RELEASE)
target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${GLIB_LIBRARY_RELEASE}>)
endif()
endif()
if ("icu" IN_LIST HARFBUZZ_FEATURES)
find_dependency(ICU 61 COMPONENTS uc)
target_link_libraries(harfbuzz INTERFACE ICU::uc)
endif()
get_filename_component(_INSTALL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
target_include_directories(harfbuzz INTERFACE "${_INSTALL_DIR}/include/harfbuzz")
set(HARFBUZZ_LIBRARY harfbuzz::harfbuzz PARENT_SCOPE)
set(HARFBUZZ_LIBRARIES harfbuzz::harfbuzz PARENT_SCOPE)
set(HARFBUZZ_INCLUDE_DIR "${_INSTALL_DIR}/include/harfbuzz" PARENT_SCOPE)
set(HARFBUZZ_INCLUDE_DIRS "${_INSTALL_DIR}/include/harfbuzz" PARENT_SCOPE)
if(HARFBUZZ_LIBRARY_RELEASE)
set(HARFBUZZ_FOUND TRUE PARENT_SCOPE)
else()
set(HARFBUZZ_FOUND FALSE PARENT_SCOPE)
endif()