Merge branch 'gallium-nopointsizeminmax'
[mesa.git] / src / glew / SConscript
1 Import('*')
2
3 # Shared environment settings
4 env = env.Clone()
5
6 env.PrependUnique(CPPPATH = [
7 '#/include',
8 ])
9
10 if env['platform'] == 'windows':
11 env.PrependUnique(LIBS = [
12 'glu32',
13 'opengl32',
14 'gdi32',
15 'user32',
16 ])
17 else:
18 env.PrependUnique(LIBS = [
19 'GLU',
20 'GL',
21 'X11',
22 ])
23
24 # Library specific environment settings
25 lib_env = env.Clone()
26
27 lib_env.Append(CPPDEFINES = [
28 'GLEW_BUILD',
29 #'GLEW_MX', # Multiple Rendering Contexts support
30 ])
31
32 if lib_env['platform'] == 'windows':
33 target = 'glew'
34 else:
35 target = 'GLEW'
36
37 source = [
38 'glew.c',
39 ]
40
41 if lib_env['platform'] == 'windows':
42 glew = lib_env.SharedLibrary(target = target, source = source)
43 env.InstallSharedLibrary(glew, version=(1, 5, 2))
44 glew = lib_env.FindIxes(glew, 'LIBPREFIX', 'LIBSUFFIX')
45 else:
46 # Use static library on Unices to avoid binary compatability issues
47 lib_env.Append(CPPDEFINES = ['GLEW_STATIC'])
48 glew = lib_env.StaticLibrary(target = target, source = source)
49
50 # Program specific environment settings
51 prog_env = env.Clone()
52
53 prog_env.Prepend(LIBS = [glew])
54
55 if prog_env['platform'] == 'darwin':
56 prog_env.Append(FRAMEWORKS = ['AGL'])
57
58 prog_env.Program(
59 target = 'glewinfo',
60 source = ['glewinfo.c'],
61 )
62
63 prog_env.Program(
64 target = 'visualinfo',
65 source = ['visualinfo.c'],
66 )
67
68 Export('glew')