From fb03e9f129ab044e255f3ecc81b928ce7f07de49 Mon Sep 17 00:00:00 2001 From: fasiondog Date: Thu, 8 Aug 2024 18:35:56 +0800 Subject: [PATCH] update --- setup.py | 2 ++ xmake.lua | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 52b2ef12..f333190c 100644 --- a/setup.py +++ b/setup.py @@ -126,6 +126,8 @@ def start_build(verbose=False, mode='release', feedback=True, worker_num=2, low_ cmd = "xmake f {} -c -y -m {} --feedback={} -k {} --low_precision={} --log_level={}".format( "-v -D" if verbose else "", mode, feedback, "shared" if mode == 'release' else "static", low_precision, 2 if mode == 'release' else 0) + if sys.platform == 'win32': + cmd = f'{cmd} --runtimes=MD' print(cmd) os.system(cmd) diff --git a/xmake.lua b/xmake.lua index fb3197f1..9918c9c3 100644 --- a/xmake.lua +++ b/xmake.lua @@ -115,7 +115,6 @@ set_configvar("HKU_ENABLE_HTTP_CLIENT_ZIP", 0) local boost_version = "1.85.0" local hdf5_version = "1.12.2" -local fmt_version = "11.0.1" local flatbuffers_version = "24.3.25" local nng_version = "1.8.0" local sqlite_version = "3.46.0+0" @@ -156,7 +155,6 @@ elseif is_plat("macosx") then end add_requires("boost " .. boost_version, { - system = false, debug = is_mode("debug"), configs = { shared = is_plat("windows"), @@ -170,13 +168,13 @@ add_requires("boost " .. boost_version, { }, }) -add_requires("fmt " .. fmt_version, {system = false}) -add_requires("spdlog", {system = false, configs = {header_only = true, fmt_external = true}}) -add_requireconfs("spdlog.fmt", {override = true, version = fmt_version, system = false}) -add_requires("sqlite3 " .. sqlite_version, {system = false, configs = {shared = true, cxflags = "-fPIC"}}) +add_requires("fmt", {configs = {header_only = true}}) +add_requires("spdlog", {configs = {header_only = true, fmt_external = true}}) +add_requireconfs("spdlog.fmt", {override = true, configs = {header_only = true}}) +add_requires("sqlite3 " .. sqlite_version, {configs = {shared = true, cxflags = "-fPIC"}}) add_requires("flatbuffers v" .. flatbuffers_version, {system = false, configs= {runtimes = get_config("runtimes")}}) -add_requires("nng " .. nng_version, {system = false, configs = {cxflags = "-fPIC"}}) -add_requires("nlohmann_json", {system = false}) +add_requires("nng " .. nng_version, {configs = {cxflags = "-fPIC"}}) +add_requires("nlohmann_json") add_defines("SPDLOG_DISABLE_DEFAULT_LOGGER") -- 禁用 spdlog 默认ogger