diff options
| author | ruki <[email protected]> | 2020-11-14 21:28:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-14 21:28:51 +0800 |
| commit | e8dae90dac349d00b9693057454a643d31edabd6 (patch) | |
| tree | ebe431b5766f1ebbaeac89cff9c148aca8cd66d0 /xmake/modules/package | |
| parent | f47594357eb354d927e7c717bf03f5d48493ddea (diff) | |
improve cmake build
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 77a204e8b..88f0df71b 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -35,9 +35,13 @@ end -- get configs for windows function _get_configs_for_windows(package, configs, opt) local cmake_generator = opt.cmake_generator - if package:is_arch("x64") and (not cmake_generator or cmake_generator:find("Visual Studio", 1, true)) then + if not cmake_generator or cmake_generator:find("Visual Studio", 1, true) then table.insert(configs, "-A") - table.insert(configs, "x64") + if package:is_arch("x86", "i386") then + table.insert(configs, "Win32") + else + table.insert(configs, "x64") + end end local vs_runtime = package:config("vs_runtime") if vs_runtime then |
