#######################################################################
# SConscript for egl-gdi target

Import('*')

if env['platform'] == 'windows':

    env = env.Clone()

    env.Append(CPPPATH = [
            '#/src/gallium/state_trackers/egl',
            '#/src/gallium/state_trackers/vega',
            '#/src/egl/main',
            '#/src/mesa',
    ])

    env.Append(CPPDEFINES = [
            'FEATURE_VG=1',
            'GALLIUM_SOFTPIPE',
            'GALLIUM_RBUG',
            'GALLIUM_TRACE',
    ])

    env.Append(LIBS = [
        'gdi32',
        'user32',
        'kernel32',
        'ws2_32',
    ])

    env['no_import_lib'] = 1

    drivers = [softpipe]
    if env['llvm']:
        env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
        drivers += [llvmpipe]
    drivers += [identity, trace, rbug]

    apis = [vgapi, st_vega]

    egl_gallium = env.SharedLibrary(
        target ='egl_gallium',
        source = 'egl-static.c',
        LIBS = st_egl_gdi + ws_gdi + drivers + apis + gallium + egl + env['LIBS'],
    )

    env.InstallSharedLibrary(egl_gallium)
