From 776bf4317ed4b850cc59d72c61d5f6799686a851 Mon Sep 17 00:00:00 2001 From: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:50:31 -0800 Subject: [PATCH] [glog] Set GLOG_STATIC_DEFINE in export.h (#35173) * fix glog * update version --------- Co-authored-by: Monica --- ports/glog/portfile.cmake | 8 +++++++- ports/glog/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/g-/glog.json | 5 +++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index 50997e7604..2363d5c034 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -35,4 +35,10 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() -file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${PORT}/export.h" "#ifdef GLOG_STATIC_DEFINE" "#if 1") +else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${PORT}/export.h" "#ifdef GLOG_STATIC_DEFINE" "#if 0") +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/glog/vcpkg.json b/ports/glog/vcpkg.json index 97dd284bdb..d080e73247 100644 --- a/ports/glog/vcpkg.json +++ b/ports/glog/vcpkg.json @@ -1,7 +1,7 @@ { "name": "glog", "version": "0.6.0", - "port-version": 2, + "port-version": 3, "description": "C++ implementation of the Google logging module", "homepage": "https://github.com/google/glog", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 92ad698aa4..e0c186b7ce 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2998,7 +2998,7 @@ }, "glog": { "baseline": "0.6.0", - "port-version": 2 + "port-version": 3 }, "gloo": { "baseline": "20201203", diff --git a/versions/g-/glog.json b/versions/g-/glog.json index 9e2e219869..3bb72a9d38 100644 --- a/versions/g-/glog.json +++ b/versions/g-/glog.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3e4dcaa54d409ed758073ef4964cf41d57996e90", + "version": "0.6.0", + "port-version": 3 + }, { "git-tree": "cce45164ee522a505686c1794e7c228e44f52d76", "version": "0.6.0",