Enable WebGL on Windows CMake build.
[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 )
24
25 add_library(libGLESv2 SHARED
26     src/libGLESv2/entry_points_egl.cpp
27     src/libGLESv2/entry_points_egl_ext.cpp
28     src/libGLESv2/entry_points_gles_2_0.cpp
29     src/libGLESv2/entry_points_gles_2_0_ext.cpp
30     src/libGLESv2/entry_points_gles_3_0.cpp
31     src/libGLESv2/entry_points_gles_3_0_ext.cpp
32     src/libGLESv2/global_state.cpp
33     src/libGLESv2/libGLESv2.cpp
34 )
35
36 add_library(libANGLE STATIC
37     src/common/angleutils.cpp
38     src/common/debug.cpp
39     src/common/event_tracer.cpp
40     src/common/mathutil.cpp
41     src/common/MemoryBuffer.cpp
42     src/common/tls.cpp
43     src/common/utilities.cpp
44     src/compiler/preprocessor/DiagnosticsBase.cpp
45     src/compiler/preprocessor/DirectiveHandlerBase.cpp
46     src/compiler/preprocessor/DirectiveParser.cpp
47     src/compiler/preprocessor/ExpressionParser.cpp
48     src/compiler/preprocessor/Input.cpp
49     src/compiler/preprocessor/Lexer.cpp
50     src/compiler/preprocessor/Macro.cpp
51     src/compiler/preprocessor/MacroExpander.cpp
52     src/compiler/preprocessor/Preprocessor.cpp
53     src/compiler/preprocessor/Token.cpp
54     src/compiler/preprocessor/Tokenizer.cpp
55     src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp
56     src/compiler/translator/OutputESSL.cpp
57     src/compiler/translator/OutputGLSL.cpp
58     src/compiler/translator/OutputGLSLBase.cpp
59     src/compiler/translator/SearchSymbol.cpp
60     src/compiler/translator/TranslatorESSL.cpp
61     src/compiler/translator/TranslatorGLSL.cpp
62     src/compiler/translator/UnfoldShortCircuit.cpp
63     src/compiler/translator/VersionGLSL.cpp
64     src/compiler/translator/ASTMetadataHLSL.cpp
65     src/compiler/translator/blocklayoutHLSL.cpp
66     src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
67     src/compiler/translator/OutputHLSL.cpp
68     src/compiler/translator/SearchSymbol.cpp
69     src/compiler/translator/StructureHLSL.cpp
70     src/compiler/translator/TranslatorHLSL.cpp
71     src/compiler/translator/UnfoldShortCircuit.cpp
72     src/compiler/translator/UniformHLSL.cpp
73     src/compiler/translator/UtilsHLSL.cpp
74     src/compiler/translator/ArrayReturnValueToOutParameter.cpp
75     src/compiler/translator/blocklayout.cpp
76     src/compiler/translator/BuiltInFunctionEmulator.cpp
77     src/compiler/translator/CallDAG.cpp
78     src/compiler/translator/CodeGen.cpp
79     src/compiler/translator/Compiler.cpp
80     src/compiler/translator/Diagnostics.cpp
81     src/compiler/translator/DirectiveHandler.cpp
82     src/compiler/translator/EmulatePrecision.cpp
83     src/compiler/translator/FlagStd140Structs.cpp
84     src/compiler/translator/ForLoopUnroll.cpp
85     src/compiler/translator/InfoSink.cpp
86     src/compiler/translator/Initialize.cpp
87     src/compiler/translator/InitializeVariables.cpp
88     src/compiler/translator/InitializeDll.cpp
89     src/compiler/translator/InitializeParseContext.cpp
90     src/compiler/translator/Intermediate.cpp
91     src/compiler/translator/IntermNode.cpp
92     src/compiler/translator/intermOut.cpp
93     src/compiler/translator/IntermTraverse.cpp
94     src/compiler/translator/LoopInfo.cpp
95     src/compiler/translator/Operator.cpp
96     src/compiler/translator/parseConst.cpp
97     src/compiler/translator/ParseContext.cpp
98     src/compiler/translator/PoolAlloc.cpp
99     src/compiler/translator/PruneEmptyDeclarations.cpp
100     src/compiler/translator/QualifierAlive.cpp
101     src/compiler/translator/RegenerateStructNames.cpp
102     src/compiler/translator/RemoveSwitchFallThrough.cpp
103     src/compiler/translator/RewriteElseBlocks.cpp
104     src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp
105     src/compiler/translator/SearchSymbol.cpp
106     src/compiler/translator/SeparateArrayInitialization.cpp
107     src/compiler/translator/SeparateDeclarations.cpp
108     src/compiler/translator/ShaderLang.cpp
109     src/compiler/translator/ShaderVars.cpp
110     src/compiler/translator/SimplifyArrayAssignment.cpp
111     src/compiler/translator/SymbolTable.cpp
112     src/compiler/translator/Types.cpp
113     src/compiler/translator/UnfoldShortCircuit.cpp
114     src/compiler/translator/UnfoldShortCircuitAST.cpp
115     src/compiler/translator/util.cpp
116     src/compiler/translator/ValidateLimitations.cpp
117     src/compiler/translator/ValidateOutputs.cpp
118     src/compiler/translator/ValidateSwitch.cpp
119     src/compiler/translator/VariableInfo.cpp
120     src/compiler/translator/VariablePacker.cpp
121     src/compiler/translator/glslang_lex.cpp
122     src/compiler/translator/glslang_tab.cpp
123     src/compiler/translator/depgraph/DependencyGraph.cpp
124     src/compiler/translator/depgraph/DependencyGraphBuilder.cpp
125     src/compiler/translator/depgraph/DependencyGraphOutput.cpp
126     src/compiler/translator/depgraph/DependencyGraphTraverse.cpp
127     src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp
128     src/compiler/translator/timing/RestrictVertexShaderTiming.cpp
129     src/compiler/translator/VersionGLSL.cpp
130     src/libANGLE/angletypes.cpp
131     src/libANGLE/AttributeMap.cpp
132     src/libANGLE/Buffer.cpp
133     src/libANGLE/Caps.cpp
134     src/libANGLE/Compiler.cpp
135     src/libANGLE/Config.cpp
136     src/libANGLE/Context.cpp
137     src/libANGLE/Data.cpp
138     src/libANGLE/Device.cpp
139     src/libANGLE/Display.cpp
140     src/libANGLE/Error.cpp
141     src/libANGLE/Fence.cpp
142     src/libANGLE/Float16ToFloat32.cpp
143     src/libANGLE/formatutils.cpp
144     src/libANGLE/Framebuffer.cpp
145     src/libANGLE/FramebufferAttachment.cpp
146     src/libANGLE/HandleAllocator.cpp
147     src/libANGLE/ImageIndex.cpp
148     src/libANGLE/Platform.cpp
149     src/libANGLE/Program.cpp
150     src/libANGLE/Query.cpp
151     src/libANGLE/queryconversions.cpp
152     src/libANGLE/RefCountObject.cpp
153     src/libANGLE/Renderbuffer.cpp
154     src/libANGLE/renderer/d3d/BufferD3D.cpp
155     src/libANGLE/renderer/d3d/CompilerD3D.cpp
156     src/libANGLE/renderer/d3d/copyimage.cpp
157     src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
158     src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
159     src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
160     src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp
161     src/libANGLE/renderer/d3d/d3d11/Fence11.cpp
162     src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp
163     src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
164     src/libANGLE/renderer/d3d/d3d11/Image11.cpp
165     src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.cpp
166     src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
167     src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
168     src/libANGLE/renderer/d3d/d3d11/Query11.cpp
169     src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
170     src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
171     src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp
172     src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp
173     src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp
174     src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
175     src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
176     src/libANGLE/renderer/d3d/d3d11/Trim11.cpp
177     src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp
178     src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
179     src/libANGLE/renderer/d3d/d3d9/Blit9.cpp
180     src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp
181     src/libANGLE/renderer/d3d/d3d9/DebugAnnotator9.cpp
182     src/libANGLE/renderer/d3d/d3d9/Fence9.cpp
183     src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp
184     src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
185     src/libANGLE/renderer/d3d/d3d9/Image9.cpp
186     src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.cpp
187     src/libANGLE/renderer/d3d/d3d9/Query9.cpp
188     src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
189     src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp
190     src/libANGLE/renderer/d3d/d3d9/RenderTarget9.cpp
191     src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.cpp
192     src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
193     src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
194     src/libANGLE/renderer/d3d/d3d9/VertexBuffer9.cpp
195     src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp
196     src/libANGLE/renderer/d3d/DeviceD3D.cpp
197     src/libANGLE/renderer/d3d/DisplayD3D.cpp
198     src/libANGLE/renderer/d3d/DynamicHLSL.cpp
199     src/libANGLE/renderer/d3d/formatutilsD3D.cpp
200     src/libANGLE/renderer/d3d/FramebufferD3D.cpp
201     src/libANGLE/renderer/d3d/HLSLCompiler.cpp
202     src/libANGLE/renderer/d3d/ImageD3D.cpp
203     src/libANGLE/renderer/d3d/IndexBuffer.cpp
204     src/libANGLE/renderer/d3d/IndexDataManager.cpp
205     src/libANGLE/renderer/d3d/loadimage.cpp
206     src/libANGLE/renderer/d3d/loadimageSSE2.cpp
207     src/libANGLE/renderer/d3d/ProgramD3D.cpp
208     src/libANGLE/renderer/d3d/RenderbufferD3D.cpp
209     src/libANGLE/renderer/d3d/RendererD3D.cpp
210     src/libANGLE/renderer/d3d/RenderTargetD3D.cpp
211     src/libANGLE/renderer/d3d/ShaderD3D.cpp
212     src/libANGLE/renderer/d3d/ShaderExecutableD3D.cpp
213     src/libANGLE/renderer/d3d/SurfaceD3D.cpp
214     src/libANGLE/renderer/d3d/TextureD3D.cpp
215     src/libANGLE/renderer/d3d/TextureStorage.cpp
216     src/libANGLE/renderer/d3d/TransformFeedbackD3D.cpp
217     src/libANGLE/renderer/d3d/VertexBuffer.cpp
218     src/libANGLE/renderer/d3d/VertexDataManager.cpp
219     src/libANGLE/renderer/DeviceImpl.cpp
220     src/libANGLE/renderer/DisplayImpl.cpp
221     src/libANGLE/renderer/IndexRangeCache.cpp
222     src/libANGLE/renderer/ProgramImpl.cpp
223     src/libANGLE/renderer/RenderbufferImpl.cpp
224     src/libANGLE/renderer/Renderer.cpp
225     src/libANGLE/renderer/SurfaceImpl.cpp
226     src/libANGLE/ResourceManager.cpp
227     src/libANGLE/Sampler.cpp
228     src/libANGLE/Shader.cpp
229     src/libANGLE/State.cpp
230     src/libANGLE/Surface.cpp
231     src/libANGLE/Texture.cpp
232     src/libANGLE/TransformFeedback.cpp
233     src/libANGLE/Uniform.cpp
234     src/libANGLE/validationEGL.cpp
235     src/libANGLE/validationES.cpp
236     src/libANGLE/validationES2.cpp
237     src/libANGLE/validationES3.cpp
238     src/libANGLE/VertexArray.cpp
239     src/libANGLE/VertexAttribute.cpp
240     src/third_party/compiler/ArrayBoundsClamper.cpp
241     src/third_party/murmurhash/MurmurHash3.cpp
242     src/third_party/systeminfo/SystemInfo.cpp
243 )
244
245 set_property(TARGET libANGLE PROPERTY COMPILE_DEFINITIONS
246     ANGLE_DEFAULT_D3D11=1
247     ANGLE_ENABLE_D3D9
248     ANGLE_ENABLE_D3D11
249     ANGLE_ENABLE_HLSL
250     ANGLE_SKIP_DXGI_1_2_CHECK=1
251     ANGLE_WEBKIT_WIN
252     LIBANGLE_IMPLEMENTATION
253     NOMINMAX
254     __STDC_LIMIT_MACROS
255 )
256
257 target_link_libraries(libEGL
258     libGLESv2
259 )
260
261 target_link_libraries(libGLESv2
262     D3d9
263     libANGLE
264 )
265
266 set_target_properties(libANGLE PROPERTIES FOLDER "ANGLE")
267 set_target_properties(libEGL PROPERTIES FOLDER "ANGLE")
268 set_target_properties(libGLESv2 PROPERTIES FOLDER "ANGLE")