diff options
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 16 |
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) |
