[*] deprio $PWD under /usr/lib.

I suppose we should treat /usr/lib like /lib instead of the the users $PATH for libs (~/usr/local/lib). /lib and /usr/lib are pretty much synonymous.

Should we add a '/usr/local/lib' below $PWD?

Should we add support for /usr/local/lib?
This commit is contained in:
Reece Wilson 2021-11-15 19:19:00 +00:00
parent 9c6114e6fb
commit 675c40d5c1

View File

@ -52,13 +52,13 @@ local function setBestDebugDir(dest)
local append = dest and dest:sub(#kPathPrefix + 1) local append = dest and dest:sub(#kPathPrefix + 1)
if (not append) then append = "" end if (not append) then append = "" end
filter("configurations:" .. Aurora.Settings.sNameOfDebug) filter(auFilterConfig(Aurora.Settings.sNameOfDebug))
debugdir(Aurora.Settings.sAbsDebug .. "/" .. append) debugdir(Aurora.Settings.sAbsDebug .. "/" .. append)
filter("configurations:" .. Aurora.Settings.sNameOfInternal) filter(auFilterConfig(Aurora.Settings.sNameOfInternal))
debugdir(Aurora.Settings.sAbsStage .. "/" .. append) debugdir(Aurora.Settings.sAbsStage .. "/" .. append)
filter("configurations:" .. Aurora.Settings.sNameOfShip) filter(auFilterConfig(Aurora.Settings.sNameOfShip))
debugdir(Aurora.Settings.sAbsShip .. "/" .. append) debugdir(Aurora.Settings.sAbsShip .. "/" .. append)
filter {} filter {}
@ -244,8 +244,6 @@ local function configureProjectForLd(prj)
linkoptions { "-Wl,-rpath,'/lib32'" } linkoptions { "-Wl,-rpath,'/lib32'" }
end end
linkoptions { "-Wl,-rpath,'$PWD'" }
linkoptions { "-Wl,-rpath,'/usr/lib'" } linkoptions { "-Wl,-rpath,'/usr/lib'" }
if (arch == "x86_64" or arch == "arm") then if (arch == "x86_64" or arch == "arm") then
@ -253,6 +251,17 @@ local function configureProjectForLd(prj)
elseif (arch == "x86_32") then elseif (arch == "x86_32") then
linkoptions { "-Wl,-rpath,'/usr/lib32'" } linkoptions { "-Wl,-rpath,'/usr/lib32'" }
end end
linkoptions { "-Wl,-rpath,'$PWD'" }
linkoptions { "-Wl,-rpath,'/usr/local/lib'" }
if (arch == "x86_64" or arch == "arm") then
linkoptions { "-Wl,-rpath,'/usr/local/lib64'" }
elseif (arch == "x86_32") then
linkoptions { "-Wl,-rpath,'/usr/local/lib32'" }
end
end) end)
end end