diff options
| author | ruki <[email protected]> | 2026-02-14 20:15:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-15 00:12:47 +0800 |
| commit | d83d2400d5c28ec5d6655a930aaa4ec913e873ae (patch) | |
| tree | 1a04af5adff9c7db6ded9448efcaabb1435b441a | |
| parent | ffe255c4b65044a833c166904a67b47cf6d14c5e (diff) | |
fix builddir
| -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 93c1ff6af..47d9406a8 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -165,9 +165,13 @@ function config.builddir(opt) builddir = path.absolute(builddir, rootdir) end - -- adjust path for the current directory + -- Adjust path for the current directory, + -- If it's an external directory, use the absolute path directly. if not opt.absolute then - builddir = path.relative(builddir, os.curdir()) + local relativedir = path.relative(builddir, os.curdir()) + if not relativedir:startswith("..") then + builddir = relativedir + end end return builddir end |
