From 36738ddda4f732fff7bbfb7b4605a47a0bd7c045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 08:27:59 +0200 Subject: glew: Split thirdparty files and isolate env Not fully happy about the way this one interacts with the various platforms. Maybe the platform_config.h should be generated by the SCsub instead of passing a define just to know where is the header. --- platform/haiku/detect.py | 1 - platform/osx/detect.py | 4 +--- platform/osx/platform_config.h | 2 +- platform/server/detect.py | 2 +- platform/windows/detect.py | 1 - platform/windows/platform_config.h | 4 +--- platform/x11/detect.py | 4 +++- platform/x11/platform_config.h | 4 +--- 8 files changed, 8 insertions(+), 14 deletions(-) (limited to 'platform') diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index f36b0c567e..8aa810e18d 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -24,7 +24,6 @@ def get_opts(): def get_flags(): return [ ('builtin_zlib', 'no'), - ('glew', 'yes'), ] def configure(env): diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 01ea09fa21..43ddfa0d1a 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -28,9 +28,7 @@ def get_opts(): def get_flags(): return [ - ('legacygl', 'yes'), - ('builtin_zlib', 'no'), - ('glew', 'yes'), + ('builtin_zlib', 'no'), ] diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index 86505206ae..f02a4bc444 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -27,5 +27,5 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" +#define GLES2_INCLUDE_H "GL/glew.h" #define PTHREAD_RENAME_SELF diff --git a/platform/server/detect.py b/platform/server/detect.py index e6fab2043b..543c88c5c2 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -27,7 +27,7 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), + ('builtin_zlib', 'no'), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 12ea5a93ee..ce308a49c9 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -176,7 +176,6 @@ def get_opts(): def get_flags(): return [ - ('glew','yes'), ('openssl','builtin'), #use builtin openssl ] diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 9e20750816..31512a1054 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -30,6 +30,4 @@ //#else //#include //#endif -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" - - +#define GLES2_INCLUDE_H "GL/glew.h" diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 90122eef4a..3ebefb640c 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -69,7 +69,6 @@ def get_flags(): return [ ('builtin_zlib', 'no'), - ('glew', 'yes'), ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), @@ -179,6 +178,9 @@ def configure(env): env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) + if (env["glew"] == "system"): + env.ParseConfig('pkg-config glew --cflags --libs') + if os.system("pkg-config --exists alsa")==0: print("Enabling ALSA") env.Append(CPPFLAGS=["-DALSA_ENABLED"]) diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h index 3b47b2c92d..015953157d 100644 --- a/platform/x11/platform_config.h +++ b/platform/x11/platform_config.h @@ -34,6 +34,4 @@ #define PTHREAD_BSD_SET_NAME #endif -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" - - +#define GLES2_INCLUDE_H "GL/glew.h" -- cgit v1.2.3