summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-28 19:30:16 +0800
committerruki <[email protected]>2020-11-28 19:30:16 +0800
commit8d86e51d1d62977fbb51a07b1fe43f728b23d9cb (patch)
tree4c75895762bcf964b244ed31963ed94a3a2a48cf
parent13c783ea053370c0f66d671b185c4c640cff3d07 (diff)
add sourcedir for tools/cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 17910878f..c6d8a29c9 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -567,10 +567,10 @@ function build(package, configs, opt)
table.insert(argv, "--" .. name .. "=" .. value)
end
end
- table.insert(argv, '..')
+ table.insert(argv, opt.sourcedir or '..')
-- do configure
- os.vrunv("cmake", argv, {envs = opt.envs or buildenvs(package, opt)})
+ os.vrunv("cmake", argv, {envs = :opt.envs or buildenvs(package, opt)})
-- do build
local cmake_generator = opt.cmake_generator
@@ -625,7 +625,7 @@ function install(package, configs, opt)
table.insert(argv, "--" .. name .. "=" .. value)
end
end
- table.insert(argv, '..')
+ table.insert(argv, opt.sourcedir or '..')
-- generate build file
os.vrunv("cmake", argv, {envs = opt.envs or buildenvs(package, opt)})