summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 0a6451b80..300f84278 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -295,7 +295,13 @@ end
function project.rcfile()
local xmakerc = project._XMAKE_RCFILE
if xmakerc == nil then
- xmakerc = os.getenv("XMAKE_RCFILE") or "~/.xmakerc.lua"
+ xmakerc = "/etc/xmakerc.lua"
+ if not os.isfile(xmakerc) then
+ xmakerc = "~/.xmakerc.lua"
+ if not os.isfile(xmakerc) then
+ xmakerc = path.join(global.directory(), "xmakerc.lua")
+ end
+ end
project._XMAKE_RCFILE = xmakerc
end
return xmakerc