Ticket #1421: 0ad-r11339-rpath.patch

File 0ad-r11339-rpath.patch, 1.1 KB (added by pcpa, 12 years ago)

0ad-r11339-rpath.patch

  • 0ad-r11339-alpha/build/premake/premake4.lua

    diff -up 0ad-r11339-alpha/build/premake/premake4.lua.orig 0ad-r11339-alpha/build/premake/premake4.lua
    old new function project_set_build_flags()  
    291291        if _OPTIONS["libdir"] then
    292292            defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] }
    293293        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 
    315294    end
    316295end
    317296