diff --git a/build3/findOpenGLGlewGlut.lua b/build3/findOpenGLGlewGlut.lua index 886b6a561..de5d21592 100644 --- a/build3/findOpenGLGlewGlut.lua +++ b/build3/findOpenGLGlewGlut.lua @@ -32,7 +32,7 @@ links { "OpenGL.framework"} configuration {"not Windows", "not MacOSX"} if os.is("Linux") then - if not _OPTIONS["force_dlopen_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then + if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then links {"GL"} else print("No GL/gl.h found, using dynamic loading of GL using glew") @@ -56,7 +56,7 @@ end if os.is("Linux") then configuration{"Linux"} - if not _OPTIONS["force_dlopen_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") and os.isfile("/usr/include/GL/glew.h")) then + if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") and os.isfile("/usr/include/GL/glew.h")) then links {"GLEW"} print ("linking against system GLEW") else @@ -75,7 +75,7 @@ function initX11() if os.is("Linux") then - if not _OPTIONS["force_dlopen_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then + if _OPTIONS["enable_system_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then links{"X11","pthread"} else print("No X11/X.h found, using dynamic loading of X11") diff --git a/build3/premake4.lua b/build3/premake4.lua index b19beb503..6a8357b30 100644 --- a/build3/premake4.lua +++ b/build3/premake4.lua @@ -25,14 +25,14 @@ newoption { - trigger = "force_dlopen_opengl", - description = "Dynamically load OpenGL (instead of static/dynamic linking)" + trigger = "enable_system_opengl", + description = "Try to link and use the system OpenGL headers version instead of dynamically loading OpenGL (dlopen is default)" } newoption { - trigger = "force_dlopen_x11", - description = "Dynamically load OpenGL (instead of static/dynamic linking)" + trigger = "enable_system_x11", + description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)" } newoption