From cc06e46a361d028c83e5b6ff6d5ede973ffd55f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 24 Jun 2020 04:07:02 +0800 Subject: [PATCH] [abseil] Fix usage issue (#12022) --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index fd77769ac7..e0ea57d1cc 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2020-03-03-6 +Version: 2020-03-03-7 Homepage: https://github.com/abseil/abseil-cpp Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index e2bedc8127..8fcf0bb763 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -52,6 +52,19 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/absl/copts ${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata - ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata) + ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/config.h + "#elif defined(ABSL_CONSUME_DLL)" "#elif 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h + "&& !defined(ABSL_CONSUME_DLL)" "&& 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/container/internal/hashtablez_sampler.h + "!defined(ABSL_CONSUME_DLL)" "0" + ) +endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file