diff options
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 6 |
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)}) |
