From 9201e1c987a85dc2c80cc007ad2b8fb1c43562ab Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Mon, 6 Sep 2021 13:52:20 +0200 Subject: Add windows check --- xmake/modules/package/tools/cmake.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 57318328f..1f0b37087 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -133,9 +133,11 @@ function _get_cflags(package, opt) table.join2(result, opt.cxflags) end table.join2(result, _get_cflags_from_packagedeps(package, opt)) - local vs_runtime = package:config("vs_runtime") - if vs_runtime then - table.insert(result, "/" .. vs_runtime) + if package:is_plat("windows") then + local vs_runtime = package:config("vs_runtime") + if vs_runtime then + table.insert(result, "/" .. vs_runtime) + end end if #result > 0 then return os.args(result) @@ -162,9 +164,11 @@ function _get_cxxflags(package, opt) table.join2(result, opt.cxflags) end table.join2(result, _get_cflags_from_packagedeps(package, opt)) - local vs_runtime = package:config("vs_runtime") - if vs_runtime then - table.insert(result, "/" .. vs_runtime) + if package:is_plat("windows") then + local vs_runtime = package:config("vs_runtime") + if vs_runtime then + table.insert(result, "/" .. vs_runtime) + end end if #result > 0 then return os.args(result) -- cgit v1.3.1