From 6116f8c4fa22bde7d5d2425dda9eb656b30c889f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 1 Apr 2015 01:00:23 +1100 Subject: Restore MESA_INSTALL_ROOT --- scripts/src/osd/sdl.lua | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'scripts/src/osd/sdl.lua') diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index d3a8dc0faa5..f905b9bb8a0 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -1,4 +1,13 @@ function maintargetosdoptions(_target) + if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then + libdirs { + path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + linkoptions { + "-Wl,-rpath=" .. path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + end + if _OPTIONS["NO_X11"]~="1" then links { "X11", @@ -131,7 +140,7 @@ end newoption { trigger = "USE_DISPATCH_GL", - description = "Use GL-dispatching", + description = "Use GL-dispatching (takes precedence over MESA_INSTALL_ROOT)", allowed = { { "0", "Link to OpenGL library" }, { "1", "Use GL-dispatching" }, @@ -146,6 +155,11 @@ if not _OPTIONS["USE_DISPATCH_GL"] then end end +newoption { + trigger = "MESA_INSTALL_ROOT", + description = "link against specific GL-Library - also adds rpath to executable", +} + newoption { trigger = "NO_X11", description = "Disable use of X11", @@ -263,10 +277,10 @@ elseif _OPTIONS["targetos"]=="os2" then end if _OPTIONS["NO_X11"]~="1" then - linkoptions { - "-L/usr/X11/lib", - "-L/usr/X11R6/lib", - "-L/usr/openwin/lib", + libdirs { + "/usr/X11/lib", + "/usr/X11R6/lib", + "/usr/openwin/lib", } if _OPTIONS["SDL_LIBVER"]=="sdl" then links { -- cgit v1.2.3