mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 21:48:59 +08:00
[freetype] Fix cmake usage (#28217)
This commit is contained in:
parent
9074f83349
commit
7d74d8dc09
@ -2,7 +2,7 @@ diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake
|
||||
index 46356b1fd..ed4cc2409 100644
|
||||
--- a/builds/cmake/FindBrotliDec.cmake
|
||||
+++ b/builds/cmake/FindBrotliDec.cmake
|
||||
@@ -35,10 +35,17 @@ find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
@@ -35,10 +35,19 @@ find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
PATH_SUFFIXES brotli)
|
||||
|
||||
find_library(BROTLIDEC_LIBRARIES
|
||||
@ -11,13 +11,15 @@ index 46356b1fd..ed4cc2409 100644
|
||||
HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
${PC_BROTLIDEC_LIBRARY_DIRS})
|
||||
|
||||
+if(BROTLIDEC_LIBRARIES MATCHES "-static")
|
||||
+get_filename_component(z_vcpkg_freetype_brotlidec_name "${BROTLIDEC_LIBRARIES}" NAME)
|
||||
+if(z_vcpkg_freetype_brotlidec_name MATCHES "-static")
|
||||
+ find_library(BROTLICOMMON_LIBRARIES
|
||||
+ NAMES brotlicommon-static
|
||||
+ HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
+ ${PC_BROTLIDEC_LIBRARY_DIRS})
|
||||
+ set(BROTLIDEC_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
|
||||
+ set(BROTLIDEC_LIBRARIES "${BROTLIDEC_LIBRARIES};${BROTLICOMMON_LIBRARIES}")
|
||||
+endif()
|
||||
+unset(z_vcpkg_freetype_brotlidec_name)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
|
@ -76,7 +76,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(
|
||||
FILE_LIST
|
||||
"${SOURCE_PATH}/LICENSE.TXT"
|
||||
|
4
ports/freetype/usage
Normal file
4
ports/freetype/usage
Normal file
@ -0,0 +1,4 @@
|
||||
freetype is compatible with built-in CMake targets:
|
||||
|
||||
find_package(Freetype REQUIRED)
|
||||
target_link_libraries(main PRIVATE Freetype::Freetype) # since CMake 3.10
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "freetype",
|
||||
"version": "2.12.1",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "A library to render fonts.",
|
||||
"homepage": "https://www.freetype.org/",
|
||||
"license": "FTL OR GPL-2.0-or-later",
|
||||
|
@ -2458,7 +2458,7 @@
|
||||
},
|
||||
"freetype": {
|
||||
"baseline": "2.12.1",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"freetype-gl": {
|
||||
"baseline": "2022-01-17",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "db92ea87ff12339808263710675221df6a06ac15",
|
||||
"version": "2.12.1",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "f1d6772ea2cb8cd74146b263b5dab534a10dd641",
|
||||
"version": "2.12.1",
|
||||
|
Loading…
Reference in New Issue
Block a user