diff -up 0ad-r11339-alpha/build/premake/premake4.lua.orig 0ad-r11339-alpha/build/premake/premake4.lua
old
|
new
|
function project_set_build_flags()
|
291 | 291 | if _OPTIONS["libdir"] then |
292 | 292 | defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] } |
293 | 293 | end |
294 | | |
295 | | if os.is("linux") or os.is("bsd") then |
296 | | -- To use our local SpiderMonkey library, it needs to be part of the |
297 | | -- runtime dynamic linker path. Add it with -rpath to make sure it gets found. |
298 | | if _OPTIONS["libdir"] then |
299 | | linkoptions {"-Wl,-rpath," .. _OPTIONS["libdir"] } |
300 | | else |
301 | | -- On FreeBSD we need to allow use of $ORIGIN |
302 | | if os.is("bsd") then |
303 | | linkoptions { "-Wl,-z,origin" } |
304 | | end |
305 | | |
306 | | -- Adding the executable path and taking care of correct escaping |
307 | | if _ACTION == "gmake" then |
308 | | linkoptions { "-Wl,-rpath,'$$ORIGIN'" } |
309 | | elseif _ACTION == "codeblocks" then |
310 | | linkoptions { "-Wl,-R\\\\$$ORIGIN" } |
311 | | end |
312 | | end |
313 | | end |
314 | | |
315 | 294 | end |
316 | 295 | end |
317 | 296 | |