diff options
| author | Redbeanw44602 <[email protected]> | 2025-07-27 22:50:34 +0800 |
|---|---|---|
| committer | Redbeanw44602 <[email protected]> | 2025-07-27 22:50:34 +0800 |
| commit | a9122ba01c57852961b5620770e7e9866de3ade3 (patch) | |
| tree | 977348fc5bb14814b906fe264b37f8764b382c35 | |
| parent | c47cad26a81ca775eecb0a9dc039cbba3ab93af1 (diff) | |
update.
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 3134fa8b4..2ce3dbd3e 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -1075,7 +1075,7 @@ end -- do build for make function _build_for_make(package, configs, opt) local argv = {} - local targets = opt.targets or table.wrap(opt.target) + local targets = table.wrap(opt.targets or opt.target) if #targets ~= 0 then table.join2(argv, targets) end @@ -1121,7 +1121,7 @@ function _build_for_cmakebuild(package, configs, opt) table.insert(argv, "--config") table.insert(argv, opt.config) end - local targets = opt.targets or table.wrap(opt.target) + local targets = table.wrap(opt.targets or opt.target) if #targets ~= 0 then table.insert(argv, "--target") if #targets > 1 then @@ -1199,8 +1199,7 @@ function _install_for_ninja(package, configs, opt) _fix_pdbdir_for_ninja(package) ninja.install(package, {}, {envs = opt.envs or buildenvs(package, opt), jobs = opt.jobs, - target = opt.target, - targets = opt.targets}) + targets = opt.target or opt.targets}) end -- do install for cmake/build |
