File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ set_xmakever("2.7.2")
2424
2525local dir = " "
2626local rcfiles = os.getenv (" XMAKE_RCFILES" )
27+ local user_repo = os.getenv (" RT_XMAKE_USERREPO_DIR" )
28+
2729if rcfiles then
2830 dir = path.directory (rcfiles ) .. " /"
2931end
@@ -33,9 +35,18 @@ includes(dir .. "rules.lua")
3335includes (dir .. " tasks.lua" )
3436includes (dir .. " toolchains.lua" )
3537
38+ if user_repo then
39+ add_repositories (" user-repo " .. user_repo )
40+ end
41+
3642for _ , item in ipairs (os.dirs (dir .. " ../../repo*" )) do
37- bn = path.basename (item )
38- add_repositories (bn .. " " .. item )
43+ if os.isfile (item .. " /repo/xmake.lua" ) then
44+ bn = path.basename (item )
45+ add_repositories (bn .. " " .. item .. " /repo" )
46+ elseif os.isdir (item .. " /packages" ) and os.isfile (item .. " /xmake.lua" ) then
47+ bn = path.basename (item )
48+ add_repositories (bn .. " " .. item )
49+ end
3950end
4051
4152local archs = {
You can’t perform that action at this time.
0 commit comments