aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-07-08 14:21:37 +0800
committerPhil Christensen <philc@microsoft.com>2019-07-07 23:21:37 -0700
commit327494e9acfbfa247d49c3fa23de85af2c1859a0 (patch)
tree053418109f6d971796d0478f14c09023eb23bf45
parent3fe88fd98820fc2a494ff41014b72a884daea11f (diff)
downloadvcpkg-327494e9acfbfa247d49c3fa23de85af2c1859a0.tar.gz
vcpkg-327494e9acfbfa247d49c3fa23de85af2c1859a0.zip
[freetype]Re-fixed the issue of exporting symbols when building dynamic library. (#7141)
-rw-r--r--ports/freetype/0005-Fix-DLL-EXPORTS.patch17
-rw-r--r--ports/freetype/CONTROL2
-rw-r--r--ports/freetype/portfile.cmake33
3 files changed, 24 insertions, 28 deletions
diff --git a/ports/freetype/0005-Fix-DLL-EXPORTS.patch b/ports/freetype/0005-Fix-DLL-EXPORTS.patch
index 96abaffb7..7ea02bbed 100644
--- a/ports/freetype/0005-Fix-DLL-EXPORTS.patch
+++ b/ports/freetype/0005-Fix-DLL-EXPORTS.patch
@@ -1,13 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index dd8a878..75f9ab7 100644
+index ede5daf..46c1e55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -141,7 +141,7 @@ set(VERSION_PATCH "1")
- # Increment REVISION.
- set(LIBRARY_VERSION "6.16.0")
- set(LIBRARY_SOVERSION "6")
--
-+ADD_DEFINITIONS(-DDLL_EXPORT)
- # These options mean "require x and complain if not found". They'll get
+@@ -151,6 +151,9 @@ set(LIBRARY_SOVERSION "6")
# optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable
# searching for a packge entirely (x is the CMake package name, so "BZip2"
+ # instead of "BZIP2").
++if (ENABLE_DLL_EXPORT)
++ ADD_DEFINITIONS(-DDLL_EXPORT)
++endif()
+ option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF)
+ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF)
+ option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF)
diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL
index 91116126d..3a52d3222 100644
--- a/ports/freetype/CONTROL
+++ b/ports/freetype/CONTROL
@@ -1,5 +1,5 @@
Source: freetype
-Version: 2.10.0
+Version: 2.10.0-1
Build-Depends: zlib, bzip2, libpng
Homepage: https://www.freetype.org/
Description: A library to render fonts.
diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake
index 39d462a34..a5c2fde79 100644
--- a/ports/freetype/portfile.cmake
+++ b/ports/freetype/portfile.cmake
@@ -7,27 +7,21 @@ vcpkg_download_distfile(ARCHIVE
SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
)
+vcpkg_extract_source_archive_ex(
+OUT_SOURCE_PATH SOURCE_PATH
+ARCHIVE ${ARCHIVE}
+REF ${FT_VERSION}
+PATCHES
+ 0001-Fix-install-command.patch
+ 0002-Add-CONFIG_INSTALL_PATH-option.patch
+ 0003-Fix-UWP.patch
+ 0005-Fix-DLL-EXPORTS.patch
+)
+
if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
- vcpkg_extract_source_archive_ex(
- OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE ${ARCHIVE}
- REF ${FT_VERSION}
- PATCHES
- 0001-Fix-install-command.patch
- 0002-Add-CONFIG_INSTALL_PATH-option.patch
- 0003-Fix-UWP.patch
- )
+ set(ENABLE_DLL_EXPORT OFF)
else()
- vcpkg_extract_source_archive_ex(
- OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE ${ARCHIVE}
- REF ${FT_VERSION}
- PATCHES
- 0001-Fix-install-command.patch
- 0002-Add-CONFIG_INSTALL_PATH-option.patch
- 0003-Fix-UWP.patch
- 0005-Fix-DLL-EXPORTS.patch
- )
+ set(ENABLE_DLL_EXPORT ON)
endif()
vcpkg_configure_cmake(
@@ -40,6 +34,7 @@ vcpkg_configure_cmake(
-DFT_WITH_PNG=ON
-DFT_WITH_HARFBUZZ=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
+ -DENABLE_DLL_EXPORT=${ENABLE_DLL_EXPORT}
)
vcpkg_install_cmake()