summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2021-09-06 13:52:20 +0200
committerSirLynix <[email protected]>2021-09-07 07:49:57 +0200
commit9201e1c987a85dc2c80cc007ad2b8fb1c43562ab (patch)
tree77dc2103c210e204ce3286e819ba6ace366a8fdc
parent559bbf4128b079988dfa75d7900696949ec27c4a (diff)
Add windows check
-rw-r--r--xmake/modules/package/tools/cmake.lua16
1 files 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)