summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-04-01 01:00:23 +1100
committer Vas Crabb <vas@vastheman.com>2015-04-01 01:21:59 +1100
commit6116f8c4fa22bde7d5d2425dda9eb656b30c889f (patch)
tree7110b24b0f0eb0f52e53a6145f4cb8c31999b9a2
parentdbc99041c339c4a11931f4b7a6738ec8c88fbe2f (diff)
Restore MESA_INSTALL_ROOT
-rw-r--r--makefile4
-rw-r--r--scripts/src/osd/sdl.lua24
-rw-r--r--scripts/src/osd/sdl_cfg.lua4
3 files changed, 27 insertions, 5 deletions
diff --git a/makefile b/makefile
index 387b6be445f..f4d21d146ed 100644
--- a/makefile
+++ b/makefile
@@ -336,6 +336,10 @@ ifdef USE_DISPATCH_GL
PARAMS += --USE_DISPATCH_GL='$(USE_DISPATCH_GL)'
endif
+ifdef MESA_INSTALL_ROOT
+PARAMS += --MESA_INSTALL_ROOT='$(MESA_INSTALL_ROOT)'
+endif
+
ifdef NO_X11
PARAMS += --NO_X11='$(NO_X11)'
endif
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" },
@@ -147,6 +156,11 @@ if not _OPTIONS["USE_DISPATCH_GL"] then
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",
allowed = {
@@ -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 {
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index dfebfe5a211..8cdc526a6c1 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -14,6 +14,10 @@ else
defines {
"USE_DISPATCH_GL=1",
}
+ elseif _OPTIONS["MESA_INSTALL_ROOT"] then
+ includedirs {
+ path.join(_OPTIONS["MESA_INSTALL_ROOT"],"include"),
+ }
end
end