5339369f41c28a370e0e1fa258156ec09860dd16
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / angle.gypi
1 # Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6     'variables':
7     {
8         'angle_code': 1,
9         'angle_post_build_script%': 0,
10     },
11     'includes':
12     [
13         'compiler.gypi',
14         'libGLESv2.gypi',
15         'libEGL.gypi'
16     ],
17
18     'targets':
19     [
20         {
21             'target_name': 'copy_scripts',
22             'type': 'none',
23             'copies':
24             [
25                 {
26                     'destination': '<(SHARED_INTERMEDIATE_DIR)',
27                     'files': [ 'commit_id.bat', 'copy_compiler_dll.bat', 'commit_id.py' ],
28                 },
29             ],
30         },
31
32         {
33             'target_name': 'commit_id',
34             'type': 'none',
35             'includes': [ '../build/common_defines.gypi', ],
36             'dependencies': [ 'copy_scripts', ],
37             'conditions':
38             [
39                 ['OS=="win"',
40                 {
41                     'actions':
42                     [
43                         {
44                             'action_name': 'Generate Commit ID Header',
45                             'message': 'Generating commit ID header...',
46                             'msvs_cygwin_shell': 0,
47                             'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(angle_path)/.git/index' ],
48                             'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
49                             'action': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(SHARED_INTERMEDIATE_DIR)' ],
50                         },
51                     ],
52                 },
53                 { # OS != win
54                     'actions':
55                     [
56                         {
57                             'action_name': 'Generate Commit ID Header',
58                             'message': 'Generating commit ID header...',
59                             'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(angle_path)/.git/index' ],
60                             'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
61                             'action': [ 'python', '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(SHARED_INTERMEDIATE_DIR)/commit.h' ],
62                         },
63                     ],
64                 }],
65             ],
66             'direct_dependent_settings':
67             {
68                 'include_dirs':
69                 [
70                     '<(SHARED_INTERMEDIATE_DIR)',
71                 ],
72             },
73         },
74     ],
75     'conditions':
76     [
77         ['OS=="win"',
78         {
79             'targets':
80             [
81                 {
82                     'target_name': 'copy_compiler_dll',
83                     'type': 'none',
84                     'dependencies': [ 'copy_scripts', ],
85                     'includes': [ '../build/common_defines.gypi', ],
86                     'actions':
87                     [
88                         {
89                             'action_name': 'copy_dll',
90                             'message': 'Copying D3D Compiler DLL...',
91                             'msvs_cygwin_shell': 0,
92                             'inputs': [ 'copy_compiler_dll.bat' ],
93                             'outputs': [ '<(PRODUCT_DIR)/D3DCompiler_46.dll' ],
94                             'action':
95                             [
96                                 "<(SHARED_INTERMEDIATE_DIR)/copy_compiler_dll.bat",
97                                 "$(PlatformName)",
98                                 "<(windows_sdk_path)",
99                                 "<(PRODUCT_DIR)"
100                             ],
101                         },
102                     ], #actions
103                 },
104             ], # targets
105         }],
106         ['angle_post_build_script!=0 and OS=="win"',
107         {
108             'targets':
109             [
110                 {
111                     'target_name': 'post_build',
112                     'type': 'none',
113                     'includes': [ '../build/common_defines.gypi', ],
114                     'dependencies': [ 'libGLESv2', 'libEGL' ],
115                     'actions':
116                     [
117                         {
118                             'action_name': 'ANGLE Post-Build Script',
119                             'message': 'Running <(angle_post_build_script)...',
120                             'msvs_cygwin_shell': 0,
121                             'inputs': [ '<(angle_post_build_script)', '<!@(["python", "<(angle_post_build_script)", "inputs", "<(angle_path)", "<(CONFIGURATION_NAME)", "$(PlatformName)", "<(PRODUCT_DIR)"])' ],
122                             'outputs': [ '<!@(python <(angle_post_build_script) outputs "<(angle_path)" "<(CONFIGURATION_NAME)" "$(PlatformName)" "<(PRODUCT_DIR)")' ],
123                             'action': ['python', '<(angle_post_build_script)', 'run', '<(angle_path)', '<(CONFIGURATION_NAME)', '$(PlatformName)', '<(PRODUCT_DIR)'],
124                         },
125                     ], #actions
126                 },
127             ], # targets
128         }],
129     ] # conditions
130 }