From 53144c971ec00d4a51a0409f9330ba6154a99e3e Mon Sep 17 00:00:00 2001 From: carl Date: Mon, 21 Apr 2025 16:54:35 +0800 Subject: add --config to cmake build install command --- xmake/modules/package/tools/cmake.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1