summaryrefslogtreecommitdiffstats
path: root/src/glew/SConscript
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-12 11:25:02 +0800
committerChia-I Wu <[email protected]>2010-01-12 11:25:02 +0800
commit562c127693200822f04a145db50add1be2425d7b (patch)
tree9441774fb212b17ddf2a364f06abc43f166cc00b /src/glew/SConscript
parente5d351dcfde58777162552cf5cd2a9cd8299f4cd (diff)
parent077d6dd7508af88509dd0499c5dfbdaa186b4015 (diff)
Merge branch 'master' into opengl-es-v2
Conflicts: src/mesa/main/dd.h
Diffstat (limited to 'src/glew/SConscript')
-rw-r--r--src/glew/SConscript57
1 files changed, 36 insertions, 21 deletions
diff --git a/src/glew/SConscript b/src/glew/SConscript
index 1161be6e633..ce6e71e1570 100644
--- a/src/glew/SConscript
+++ b/src/glew/SConscript
@@ -1,29 +1,12 @@
Import('*')
-if env['platform'] not in ['windows', 'linux']:
- Return()
-
+# Shared environment settings
env = env.Clone()
-env.Append(CPPDEFINES = [
- 'GLEW_BUILD',
- 'GLEW_STATIC',
- #'GLEW_MX', # Multiple Rendering Contexts support
-])
-
env.PrependUnique(CPPPATH = [
'#/include',
])
-glew = env.StaticLibrary(
- target = 'glew',
- source = [
- 'glew.c',
- ],
-)
-
-env = env.Clone()
-
if env['platform'] == 'windows':
env.PrependUnique(LIBS = [
'glu32',
@@ -37,14 +20,46 @@ else:
'GL',
'X11',
])
-env.Prepend(LIBS = [glew])
-env.Program(
+# Library specific environment settings
+lib_env = env.Clone()
+
+lib_env.Append(CPPDEFINES = [
+ 'GLEW_BUILD',
+ #'GLEW_MX', # Multiple Rendering Contexts support
+])
+
+if lib_env['platform'] == 'windows':
+ target = 'glew'
+else:
+ target = 'GLEW'
+
+source = [
+ 'glew.c',
+]
+
+if lib_env['platform'] == 'windows':
+ glew = lib_env.SharedLibrary(target = target, source = source)
+ env.InstallSharedLibrary(glew, version=(1, 5, 2))
+ glew = lib_env.FindIxes(glew, 'LIBPREFIX', 'LIBSUFFIX')
+else:
+ # Use static library on Unices to avoid binary compatability issues
+ lib_env.Append(CPPDEFINES = ['GLEW_STATIC'])
+ glew = lib_env.StaticLibrary(target = target, source = source)
+
+# Program specific environment settings
+prog_env = env.Clone()
+
+prog_env.Prepend(LIBS = [glew])
+
+prog_env.Program(
target = 'glewinfo',
source = ['glewinfo.c'],
)
-env.Program(
+prog_env.Program(
target = 'visualinfo',
source = ['visualinfo.c'],
)
+
+Export('glew')