From 768e9252714b57421b5c893a8258469a14630a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 7 Jun 2016 19:59:33 +0200 Subject: GLEW: Define static + enabled and includes via SCons This allows us not to have to hack our definitions in the upstream files, making it easier to upgrade to newer versions in the future. For the include paths to work, the headers are moved to a GL subfolder to match their upstream location. --- drivers/gl_context/SCsub | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/gl_context/SCsub') diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index 7cf8629fe1..dac27c0125 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -1,5 +1,11 @@ Import('env') -Export('env'); env.add_source_files(env.drivers_sources,"*.cpp") -env.add_source_files(env.drivers_sources,"*.c") + +if (env.get('glew') == 'yes'): + env.add_source_files(env.drivers_sources,"glew.c") + env.Append(CPPFLAGS = ['-DGLEW_ENABLED']) + env.Append(CPPFLAGS = ['-DGLEW_STATIC']) + env.Append(CPPPATH = ['.']) + +Export('env') -- cgit v1.2.3