From f7b851b181402837d3a598c785513d26c1e55d28 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 3 Jun 2024 14:59:27 +0800 Subject: [PATCH] fix glog & folly (#4228) --- packages/g/glog/xmake.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/g/glog/xmake.lua b/packages/g/glog/xmake.lua index ef1dd1f81..7ba5a17ac 100644 --- a/packages/g/glog/xmake.lua +++ b/packages/g/glog/xmake.lua @@ -36,10 +36,6 @@ package("glog") package:add("deps", dep) end end - - if package:version():ge("0.7.0") then - package:add("defines", "GLOG_USE_GLOG_EXPORT") - end end) on_install(function (package) @@ -50,11 +46,18 @@ package("glog") table.insert(configs, "-DWITH_" .. config:upper() .. "=" .. (package:config(config) and "ON" or "OFF")) end + -- fix cmake try run if package:is_plat("mingw") then - -- fix cmake try run table.insert(configs, "-DHAVE_SYMBOLIZE_EXITCODE=ON") end + import("package.tools.cmake").install(package, configs) + + -- fix https://github.com/xmake-io/xmake-repo/discussions/4221 + if package:version() and package:version():ge("0.7.0") then + io.replace(path.join(package:installdir("include"), "glog/logging.h"), + "#define GLOG_LOGGING_H", "#define GLOG_LOGGING_H\n#define GLOG_USE_GLOG_EXPORT", {plain = true}) + end end) on_test(function (package)