aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-08-05 11:05:18 +0800
committerGitHub <noreply@github.com>2021-08-04 20:05:18 -0700
commitd2019e507caf9469d8d5c93bfcd3f6d26548ca12 (patch)
tree771371e0aec257c4235a205e8df4cd8c4eb7fdd0 /ports
parentfa43004f0c20e37a2564701d25c5b1226cc91855 (diff)
downloadvcpkg-d2019e507caf9469d8d5c93bfcd3f6d26548ca12.tar.gz
vcpkg-d2019e507caf9469d8d5c93bfcd3f6d26548ca12.zip
[vcpkg baseline][hunspell] Fix usage when building static (#19323)
Diffstat (limited to 'ports')
-rw-r--r--ports/hunspell/portfile.cmake13
-rw-r--r--ports/hunspell/vcpkg.json2
2 files changed, 14 insertions, 1 deletions
diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake
index bf48b9c2e..053d1dda4 100644
--- a/ports/hunspell/portfile.cmake
+++ b/ports/hunspell/portfile.cmake
@@ -77,6 +77,19 @@ else()
endif()
vcpkg_copy_pdbs()
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ if (VCPKG_TARGET_IS_WINDOWS)
+ set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunvisapi.h")
+ else()
+ set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunspell/hunvisapi.h")
+ endif()
+ vcpkg_replace_string(
+ ${HUNSPELL_EXPORT_HDR}
+ "#if defined(HUNSPELL_STATIC)"
+ "#if 1"
+ )
+endif()
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
diff --git a/ports/hunspell/vcpkg.json b/ports/hunspell/vcpkg.json
index 372bac8dc..c89c4ca94 100644
--- a/ports/hunspell/vcpkg.json
+++ b/ports/hunspell/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "hunspell",
"version": "1.7.0",
- "port-version": 4,
+ "port-version": 5,
"description": "The most popular spellchecking library.",
"homepage": "https://github.com/hunspell/hunspell",
"supports": "!((arm | uwp) & windows)",