Home | History | Annotate | Download | only in osmesa
      1 Import('*')
      2 
      3 env = env.Clone()
      4 
      5 env.Prepend(CPPPATH = [
      6     '#src/mapi',
      7     '#src/mesa',
      8 ])
      9 
     10 env.Prepend(LIBS = [
     11     glapi,
     12     mesa,
     13     glsl,
     14 ])
     15 
     16 sources = [
     17     'osmesa.c',
     18 ]
     19 
     20 if env['platform'] == 'windows':
     21     env.AppendUnique(CPPDEFINES = [
     22         '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
     23         'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 
     24     ])
     25     if not env['gles']:
     26         # prevent _glapi_* from being declared __declspec(dllimport)
     27         env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
     28 
     29     sources += ['osmesa.def']
     30     
     31 osmesa = env.SharedLibrary(
     32     target ='osmesa',
     33     source = sources,
     34 )
     35 
     36 env.Alias('osmesa', osmesa)
     37 
     38 env.Depends(sources, glapi_headers)
     39