targets/egl: Add SConscript for egl-apis.
authorChia-I Wu <olv@lunarg.com>
Mon, 31 May 2010 04:38:44 +0000 (12:38 +0800)
committerChia-I Wu <olv@lunarg.com>
Mon, 31 May 2010 05:28:03 +0000 (13:28 +0800)
It will build api_OpenVG.dll on Windows.

src/gallium/targets/SConscript
src/gallium/targets/egl-apis/SConscript [new file with mode: 0644]

index bae839a772f8ac98a2a91a02d147a0c98e888eec..b61a4855af161d53d325a8dc0d5fa91eedc1d4c3 100644 (file)
@@ -33,6 +33,7 @@ if 'xorg' in env['statetrackers']:
 if 'egl' in env['statetrackers']:
        SConscript([
                'egl-swrast/SConscript',
+               'egl-apis/SConscript',
        ])
 
 # Ideally all non-target directories would produce convenience
diff --git a/src/gallium/targets/egl-apis/SConscript b/src/gallium/targets/egl-apis/SConscript
new file mode 100644 (file)
index 0000000..0ca3d1f
--- /dev/null
@@ -0,0 +1,33 @@
+#######################################################################
+# SConscript for egl-apis target
+
+Import('*')
+
+if env['platform'] == 'windows':
+
+    env = env.Clone()
+
+    env.Append(CPPPATH = [
+            '#/src/gallium/state_trackers/vega',
+    ])
+
+    env.Append(LIBS = [
+        'gdi32',
+        'user32',
+        'kernel32',
+        'ws2_32',
+    ])
+
+    env['no_import_lib'] = 1
+
+    api_libs = {
+        'OpenVG': vgapi + st_vega,
+    }
+
+    for name in api_libs.keys():
+        api = env.SharedLibrary(
+            target = 'api_' + name,
+            source = ['api_' + name + '.c'],
+            LIBS = api_libs[name] + gallium + env['LIBS'],
+        )
+        env.InstallSharedLibrary(api)