diff options
| author | ruki <[email protected]> | 2021-09-29 22:47:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-29 22:47:38 +0800 |
| commit | 913fcb7fbe40b009eb6759dd00b37ece56ef72a8 (patch) | |
| tree | d9997a6907cf162e47368b0f501938054c7aa731 /xmake/core/project/config.lua | |
| parent | 9b11147b98d5b51bc5064757c7f3629e5ad37cbb (diff) | |
support to build embed package with cmake
Diffstat (limited to 'xmake/core/project/config.lua')
| -rw-r--r-- | xmake/core/project/config.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index 31e7d0cb5..16912ab68 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -90,9 +90,11 @@ function config.options() end -- get the buildir -function config.buildir() +-- we can use `{absolute = true}` to force to get absolute path +function config.buildir(opt) -- get the absolute path first + opt = opt or {} local buildir = config.get("buildir") or "build" if not path.is_absolute(buildir) then local rootdir @@ -106,7 +108,9 @@ function config.buildir() end -- adjust path for the current directory - buildir = path.relative(buildir, os.curdir()) + if not opt.absolute then + buildir = path.relative(buildir, os.curdir()) + end return buildir end |
