summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorcarl <[email protected]>2025-04-21 16:54:35 +0800
committercarl <[email protected]>2025-04-21 16:54:35 +0800
commit53144c971ec00d4a51a0409f9330ba6154a99e3e (patch)
tree4f241050a13a5c47e9d11861902cb3132715ac78 /xmake/modules/package/tools/cmake.lua
parent0f20ce8e8e6c5cc9a69251c57c97eb310236f862 (diff)
add --config to cmake build install command
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index c1eed339a..8fd001d71 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1184,12 +1184,15 @@ function _install_for_cmakebuild(package, configs, opt)
opt = opt or {}
local cmake = assert(find_tool("cmake"), "cmake not found!")
local argv = {"--build", os.curdir()}
+ local install_argv = {"--install", os.curdir()}
if opt.config then
table.insert(argv, "--config")
table.insert(argv, opt.config)
+ table.insert(install_argv, "--config")
+ table.insert(install_argv, opt.config)
end
os.vrunv(cmake.program, argv, {envs = opt.envs or buildenvs(package)})
- os.vrunv(cmake.program, {"--install", os.curdir()})
+ os.vrunv(cmake.program, install_argv)
end
-- get cmake generator