summaryrefslogtreecommitdiff
path: root/drivers/gl_context/SCsub
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-06-07 19:59:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-06-08 00:16:27 +0200
commit768e9252714b57421b5c893a8258469a14630a30 (patch)
treeab2299c7533af5dc207b2c43d14a3c242cd0974b /drivers/gl_context/SCsub
parent4c658dc52303ece088a245ede2835a68b78530b2 (diff)
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.
Diffstat (limited to 'drivers/gl_context/SCsub')
-rw-r--r--drivers/gl_context/SCsub10
1 files changed, 8 insertions, 2 deletions
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')