• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Import('*')
2
3env = env.Clone()
4
5env.Prepend(CPPPATH = [
6    '#src',
7    '#src/mapi',
8    '#src/mesa',
9    Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
10    Dir('../../../mapi/glapi'), # src/mapi/glapi build path
11])
12
13env.Prepend(LIBS = [
14    mesautil,
15    glapi,
16    compiler,
17    mesa,
18    glsl,
19])
20
21sources = [
22    'osmesa.c',
23]
24
25if env['platform'] == 'windows':
26    env.AppendUnique(CPPDEFINES = [
27        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
28        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
29    ])
30    if not env['gles']:
31        # prevent _glapi_* from being declared __declspec(dllimport)
32        env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
33
34    sources += ['osmesa.def']
35
36osmesa = env.SharedLibrary(
37    target ='osmesa',
38    source = sources,
39)
40
41env.Alias('osmesa', osmesa)
42