summaryrefslogtreecommitdiffstats
path: root/src/glew/SConscript
blob: 1161be6e633e5731dfd24a8a5f9882211ba7d7a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Import('*')

if env['platform'] not in ['windows', 'linux']:
    Return()

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', 
        'opengl32', 
        'gdi32', 
        'user32', 
    ])
else:
    env.PrependUnique(LIBS = [
        'GLU',
        'GL',
        'X11',
    ])
env.Prepend(LIBS = [glew])

env.Program(
    target = 'glewinfo',
    source = ['glewinfo.c'],
)

env.Program(
    target = 'visualinfo',
    source = ['visualinfo.c'],
)