mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[freetype][harfbuzz] Fix static freetype dependency.
This commit is contained in:
parent
d35866018a
commit
353d635b97
@ -1,5 +1,4 @@
|
||||
The package freetype is compatible with built-in CMake targets:
|
||||
|
||||
find_package(Freetype REQUIRED)
|
||||
target_link_libraries(main PRIVATE ${FREETYPE_LIBRARIES})
|
||||
target_include_directories(main PRIVATE ${FREETYPE_INCLUDE_DIRS})
|
||||
target_link_libraries(main PRIVATE Freetype::Freetype)
|
||||
|
13
ports/harfbuzz/find-package-freetype.patch
Normal file
13
ports/harfbuzz/find-package-freetype.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 24ccb6f..21df836 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -201,7 +201,7 @@ set(project_headers
|
||||
## Find and include needed header folders and libraries
|
||||
if (HB_HAVE_FREETYPE)
|
||||
|
||||
- include(FindFreetype)
|
||||
+ find_package(Freetype REQUIRED)
|
||||
if (NOT FREETYPE_FOUND)
|
||||
message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix")
|
||||
endif()
|
@ -10,7 +10,9 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/find-package-freetype.patch"
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
|
@ -206,6 +206,17 @@ macro(find_package name)
|
||||
if(TIFF_LIBRARIES)
|
||||
list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
elseif("${name}" STREQUAL "Freetype")
|
||||
_find_package(${ARGV})
|
||||
find_package(ZLIB)
|
||||
find_package(PNG)
|
||||
find_package(BZip2)
|
||||
if(TARGET Freetype::Freetype)
|
||||
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB)
|
||||
endif()
|
||||
if(FREETYPE_LIBRARIES)
|
||||
list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
elseif("${name}" STREQUAL "tinyxml2")
|
||||
_find_package(${ARGV})
|
||||
if(TARGET tinyxml2_static AND NOT TARGET tinyxml2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user