Build fix after r199738
[WebKit-https.git] / Source / ThirdParty / ANGLE / CMakeLists.txt
1 include_directories(
2     src
3     include
4     include/KHR
5 )
6
7 if (${CMAKE_GENERATOR} MATCHES "Ninja")
8     if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
9         link_directories(${WINDOWSSDKDIR}Lib/${WINDOWSSDKLIBVERSION}/um/x86)
10     else ()
11         link_directories(${WINDOWSSDKDIR}Lib/${WINDOWSSDKLIBVERSION}/um/x64)
12     endif ()
13 else ()
14     if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
15         link_directories($(WINDOWSSDKDIR)Lib/$(WINDOWSSDKLIBVERSION)/um/x86)
16     else ()
17         link_directories($(WINDOWSSDKDIR)Lib/$(WINDOWSSDKLIBVERSION)/um/x64)
18     endif ()
19 endif ()
20
21 add_library(libEGL SHARED
22     src/libEGL/libEGL.cpp
23     src/libEGL/libEGL.def
24     src/libEGL/libEGL.rc
25 )
26
27 set_property(TARGET libEGL PROPERTY COMPILE_DEFINITIONS
28     ANGLE_WEBKIT_WIN
29     EGLAPI=
30 )
31
32 add_library(libGLESv2 SHARED
33     src/libGLESv2/entry_points_egl.cpp
34     src/libGLESv2/entry_points_egl_ext.cpp
35     src/libGLESv2/entry_points_gles_2_0.cpp
36     src/libGLESv2/entry_points_gles_2_0_ext.cpp
37     src/libGLESv2/entry_points_gles_3_0.cpp
38     src/libGLESv2/entry_points_gles_3_0_ext.cpp
39     src/libGLESv2/global_state.cpp
40     src/libGLESv2/libGLESv2.cpp
41     src/libGLESv2/libGLESv2.def
42     src/libGLESv2/libGLESv2.rc
43 )
44
45 set_property(TARGET libGLESv2 PROPERTY COMPILE_DEFINITIONS
46     ANGLE_WEBKIT_WIN
47     GL_APICALL=
48     LIBGLESV2_IMPLEMENTATION
49 )
50
51 add_library(libANGLE STATIC
52     src/common/angleutils.cpp
53     src/common/debug.cpp
54     src/common/event_tracer.cpp
55     src/common/mathutil.cpp
56     src/common/MemoryBuffer.cpp
57     src/common/tls.cpp
58     src/common/utilities.cpp
59     src/compiler/preprocessor/DiagnosticsBase.cpp
60     src/compiler/preprocessor/DirectiveHandlerBase.cpp
61     src/compiler/preprocessor/DirectiveParser.cpp
62     src/compiler/preprocessor/ExpressionParser.cpp
63     src/compiler/preprocessor/Input.cpp
64     src/compiler/preprocessor/Lexer.cpp
65     src/compiler/preprocessor/Macro.cpp
66     src/compiler/preprocessor/MacroExpander.cpp
67     src/compiler/preprocessor/Preprocessor.cpp
68     src/compiler/preprocessor/Token.cpp
69     src/compiler/preprocessor/Tokenizer.cpp
70     src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp
71     src/compiler/translator/OutputESSL.cpp
72     src/compiler/translator/OutputGLSL.cpp
73     src/compiler/translator/OutputGLSLBase.cpp
74     src/compiler/translator/SearchSymbol.cpp
75     src/compiler/translator/TranslatorESSL.cpp
76     src/compiler/translator/TranslatorGLSL.cpp
77     src/compiler/translator/VersionGLSL.cpp
78     src/compiler/translator/ASTMetadataHLSL.cpp
79     src/compiler/translator/blocklayoutHLSL.cpp
80     src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
81     src/compiler/translator/OutputHLSL.cpp
82     src/compiler/translator/SearchSymbol.cpp
83     src/compiler/translator/StructureHLSL.cpp
84     src/compiler/translator/TranslatorHLSL.cpp
85     src/compiler/translator/UniformHLSL.cpp
86     src/compiler/translator/UtilsHLSL.cpp
87     src/compiler/translator/ArrayReturnValueToOutParameter.cpp
88     src/compiler/translator/blocklayout.cpp
89     src/compiler/translator/BuiltInFunctionEmulator.cpp
90     src/compiler/translator/Cache.cpp
91     src/compiler/translator/CallDAG.cpp
92     src/compiler/translator/CodeGen.cpp
93     src/compiler/translator/Compiler.cpp
94     src/compiler/translator/DeferGlobalInitializers.cpp
95     src/compiler/translator/Diagnostics.cpp
96     src/compiler/translator/DirectiveHandler.cpp
97     src/compiler/translator/EmulatePrecision.cpp
98     src/compiler/translator/FlagStd140Structs.cpp
99     src/compiler/translator/ForLoopUnroll.cpp
100     src/compiler/translator/InfoSink.cpp
101     src/compiler/translator/Initialize.cpp
102     src/compiler/translator/InitializeVariables.cpp
103     src/compiler/translator/InitializeDll.cpp
104     src/compiler/translator/InitializeParseContext.cpp
105     src/compiler/translator/Intermediate.cpp
106     src/compiler/translator/IntermNode.cpp
107     src/compiler/translator/intermOut.cpp
108     src/compiler/translator/IntermTraverse.cpp
109     src/compiler/translator/LoopInfo.cpp
110     src/compiler/translator/Operator.cpp
111     src/compiler/translator/ParseContext.cpp
112     src/compiler/translator/PoolAlloc.cpp
113     src/compiler/translator/PruneEmptyDeclarations.cpp
114     src/compiler/translator/RegenerateStructNames.cpp
115     src/compiler/translator/RemoveDynamicIndexing.cpp
116     src/compiler/translator/RemovePow.cpp
117     src/compiler/translator/RemoveSwitchFallThrough.cpp
118     src/compiler/translator/RewriteDoWhile.cpp
119     src/compiler/translator/RewriteElseBlocks.cpp
120     src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp
121     src/compiler/translator/SearchSymbol.cpp
122     src/compiler/translator/SeparateArrayInitialization.cpp
123     src/compiler/translator/SeparateDeclarations.cpp
124     src/compiler/translator/SeparateExpressionsReturningArrays.cpp
125     src/compiler/translator/ShaderLang.cpp
126     src/compiler/translator/ShaderVars.cpp
127     src/compiler/translator/SymbolTable.cpp
128     src/compiler/translator/Types.cpp
129     src/compiler/translator/UnfoldShortCircuitAST.cpp
130     src/compiler/translator/UnfoldShortCircuitToIf.cpp
131     src/compiler/translator/util.cpp
132     src/compiler/translator/ValidateGlobalInitializer.cpp
133     src/compiler/translator/ValidateLimitations.cpp
134     src/compiler/translator/ValidateMaxParameters.cpp
135     src/compiler/translator/ValidateOutputs.cpp
136     src/compiler/translator/ValidateSwitch.cpp
137     src/compiler/translator/VariableInfo.cpp
138     src/compiler/translator/VariablePacker.cpp
139     src/compiler/translator/glslang_lex.cpp
140     src/compiler/translator/glslang_tab.cpp
141     src/compiler/translator/depgraph/DependencyGraph.cpp
142     src/compiler/translator/depgraph/DependencyGraphBuilder.cpp
143     src/compiler/translator/depgraph/DependencyGraphOutput.cpp
144     src/compiler/translator/depgraph/DependencyGraphTraverse.cpp
145     src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp
146     src/compiler/translator/timing/RestrictVertexShaderTiming.cpp
147     src/compiler/translator/VersionGLSL.cpp
148     src/libANGLE/angletypes.cpp
149     src/libANGLE/AttributeMap.cpp
150     src/libANGLE/Buffer.cpp
151     src/libANGLE/Caps.cpp
152     src/libANGLE/Compiler.cpp
153     src/libANGLE/Config.cpp
154     src/libANGLE/Context.cpp
155     src/libANGLE/Data.cpp
156     src/libANGLE/Debug.cpp
157     src/libANGLE/Device.cpp
158     src/libANGLE/Display.cpp
159     src/libANGLE/Error.cpp
160     src/libANGLE/Fence.cpp
161     src/libANGLE/Float16ToFloat32.cpp
162     src/libANGLE/formatutils.cpp
163     src/libANGLE/Framebuffer.cpp
164     src/libANGLE/FramebufferAttachment.cpp
165     src/libANGLE/HandleAllocator.cpp
166     src/libANGLE/IndexRangeCache.cpp
167     src/libANGLE/Image.cpp
168     src/libANGLE/ImageIndex.cpp
169     src/libANGLE/Platform.cpp
170     src/libANGLE/Program.cpp
171     src/libANGLE/Query.cpp
172     src/libANGLE/queryconversions.cpp
173     src/libANGLE/RefCountObject.cpp
174     src/libANGLE/Renderbuffer.cpp
175     src/libANGLE/Stream.cpp
176     src/libANGLE/renderer/d3d/BufferD3D.cpp
177     src/libANGLE/renderer/d3d/CompilerD3D.cpp
178     src/libANGLE/renderer/d3d/EGLImageD3D.cpp
179     src/libANGLE/renderer/d3d/copyimage.cpp
180     src/libANGLE/renderer/d3d/loadimage_etc.cpp
181     src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
182     src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
183     src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
184     src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp
185     src/libANGLE/renderer/d3d/d3d11/Fence11.cpp
186     src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp
187     src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
188     src/libANGLE/renderer/d3d/d3d11/Image11.cpp
189     src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.cpp
190     src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
191     src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
192     src/libANGLE/renderer/d3d/d3d11/Query11.cpp
193     src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
194     src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
195     src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp
196     src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp
197     src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
198     src/libANGLE/renderer/d3d/d3d11/Stream11.cpp
199     src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp
200     src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
201     src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
202     src/libANGLE/renderer/d3d/d3d11/Trim11.cpp
203     src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
204     src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp
205     src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp
206     src/libANGLE/renderer/d3d/d3d11/load_functions_table_autogen.cpp
207     src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp
208     src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
209     src/libANGLE/renderer/d3d/d3d9/Blit9.cpp
210     src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp
211     src/libANGLE/renderer/d3d/d3d9/DebugAnnotator9.cpp
212     src/libANGLE/renderer/d3d/d3d9/Fence9.cpp
213     src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp
214     src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
215     src/libANGLE/renderer/d3d/d3d9/Image9.cpp
216     src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp
217     src/libANGLE/renderer/d3d/d3d9/Query9.cpp
218     src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
219     src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp
220     src/libANGLE/renderer/d3d/d3d9/RenderTarget9.cpp
221     src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.cpp
222     src/libANGLE/renderer/d3d/d3d9/StateManager9.cpp
223     src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
224     src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
225     src/libANGLE/renderer/d3d/d3d9/VertexBuffer9.cpp
226     src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp
227     src/libANGLE/renderer/d3d/DeviceD3D.cpp
228     src/libANGLE/renderer/d3d/DisplayD3D.cpp
229     src/libANGLE/renderer/d3d/DynamicHLSL.cpp
230     src/libANGLE/renderer/d3d/formatutilsD3D.cpp
231     src/libANGLE/renderer/d3d/FramebufferD3D.cpp
232     src/libANGLE/renderer/d3d/HLSLCompiler.cpp
233     src/libANGLE/renderer/d3d/ImageD3D.cpp
234     src/libANGLE/renderer/d3d/IndexBuffer.cpp
235     src/libANGLE/renderer/d3d/IndexDataManager.cpp
236     src/libANGLE/renderer/d3d/loadimage.cpp
237     src/libANGLE/renderer/d3d/loadimageSSE2.cpp
238     src/libANGLE/renderer/d3d/ProgramD3D.cpp
239     src/libANGLE/renderer/d3d/RenderbufferD3D.cpp
240     src/libANGLE/renderer/d3d/RendererD3D.cpp
241     src/libANGLE/renderer/d3d/RenderTargetD3D.cpp
242     src/libANGLE/renderer/d3d/ShaderD3D.cpp
243     src/libANGLE/renderer/d3d/ShaderExecutableD3D.cpp
244     src/libANGLE/renderer/d3d/SurfaceD3D.cpp
245     src/libANGLE/renderer/d3d/TextureD3D.cpp
246     src/libANGLE/renderer/d3d/TransformFeedbackD3D.cpp
247     src/libANGLE/renderer/d3d/VaryingPacking.cpp
248     src/libANGLE/renderer/d3d/VertexBuffer.cpp
249     src/libANGLE/renderer/d3d/VertexDataManager.cpp
250     src/libANGLE/renderer/DeviceImpl.cpp
251     src/libANGLE/renderer/DisplayImpl.cpp
252     src/libANGLE/renderer/Renderer.cpp
253     src/libANGLE/renderer/SurfaceImpl.cpp
254     src/libANGLE/ResourceManager.cpp
255     src/libANGLE/Sampler.cpp
256     src/libANGLE/Shader.cpp
257     src/libANGLE/State.cpp
258     src/libANGLE/Surface.cpp
259     src/libANGLE/Texture.cpp
260     src/libANGLE/TransformFeedback.cpp
261     src/libANGLE/Uniform.cpp
262     src/libANGLE/validationEGL.cpp
263     src/libANGLE/validationES.cpp
264     src/libANGLE/validationES2.cpp
265     src/libANGLE/validationES3.cpp
266     src/libANGLE/VertexArray.cpp
267     src/libANGLE/VertexAttribute.cpp
268     src/third_party/compiler/ArrayBoundsClamper.cpp
269     src/third_party/murmurhash/MurmurHash3.cpp
270     src/third_party/systeminfo/SystemInfo.cpp
271 )
272
273 set_property(TARGET libANGLE PROPERTY COMPILE_DEFINITIONS
274     ANGLE_DEFAULT_D3D11=1
275     ANGLE_ENABLE_D3D9
276     ANGLE_ENABLE_D3D11
277     ANGLE_ENABLE_HLSL
278     ANGLE_SKIP_DXGI_1_2_CHECK=1
279     ANGLE_WEBKIT_WIN
280     LIBANGLE_IMPLEMENTATION
281     NOMINMAX
282     __STDC_LIMIT_MACROS
283 )
284
285 target_link_libraries(libEGL
286     libGLESv2
287 )
288
289 target_link_libraries(libGLESv2
290     D3d9
291     libANGLE
292 )
293
294 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl)
295 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLES2)
296 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLSLANG)
297 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr)
298 file(GLOB _files_ANGLE "${THIRDPARTY_DIR}/ANGLE/ANGLE/*.h")
299 file(GLOB _files_egl "${THIRDPARTY_DIR}/ANGLE/include/egl/*.h")
300 file(GLOB _files_GLES2 "${THIRDPARTY_DIR}/ANGLE/include/GLES2/*.h")
301 file(GLOB _files_GLSLANG "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG/*.h")
302 file(GLOB _files_khr "${THIRDPARTY_DIR}/ANGLE/include/khr/*.h")
303 foreach (_file ${_files_ANGLE})
304     file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/)
305 endforeach ()
306 foreach (_file ${_files_egl})
307     file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl)
308 endforeach ()
309 foreach (_file ${_files_GLES2})
310     file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLES2)
311 endforeach ()
312 foreach (_file ${_files_GLSLANG})
313     file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLSLANG)
314 endforeach ()
315 foreach (_file ${_files_khr})
316     file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr)
317 endforeach ()
318
319 set_property(DIRECTORY . PROPERTY FOLDER "ANGLE")