diff options
| author | ruki <[email protected]> | 2020-06-02 22:36:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-02 09:39:41 +0800 |
| commit | 5cdcb3547f4d67b242018d9a5cb4c4a7e8af8609 (patch) | |
| tree | a970842cff38a22d0e4dfb6900ed6f7282c47a6f /xmake/core/project/config.lua | |
| parent | c1c4b41dc630828d99bcb996efc7be8d1adca565 (diff) | |
improve configdir
Diffstat (limited to 'xmake/core/project/config.lua')
| -rw-r--r-- | xmake/core/project/config.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index 49d093663..382ab03e0 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -148,7 +148,13 @@ end -- get the configure directory on the current host/arch platform function config.directory() if config._DIRECTORY == nil then - local rootdir = os.getenv("XMAKE_CONFIGDIR") or os.projectdir() + local rootdir = os.getenv("XMAKE_CONFIGDIR") + if not rootdir and os.isdir(path.join(os.workingdir(), ".xmake")) then + rootdir = os.workingdir() + end + if not rootdir then + rootdir = os.projectdir() + end config._DIRECTORY = path.join(rootdir, "." .. xmake._NAME, os.host(), os.arch()) end return config._DIRECTORY |
