• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 The SwiftShader Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15set(ROOT_PROJECT_COMPILE_OPTIONS
16    ${SWIFTSHADER_COMPILE_OPTIONS}
17    ${WARNINGS_AS_ERRORS}
18)
19
20set(RENDERER_SRC_FILES
21    Blitter.cpp
22    Clipper.cpp
23    Color.cpp
24    Context.cpp
25    ETC_Decoder.cpp
26    Matrix.cpp
27    PixelProcessor.cpp
28    Plane.cpp
29    Point.cpp
30    QuadRasterizer.cpp
31    Renderer.cpp
32    Sampler.cpp
33    SetupProcessor.cpp
34    Surface.cpp
35    TextureStage.cpp
36    Vector.cpp
37    VertexProcessor.cpp
38    Blitter.hpp
39    Clipper.hpp
40    Color.hpp
41    Context.hpp
42    ETC_Decoder.hpp
43    LRUCache.hpp
44    Matrix.hpp
45    PixelProcessor.hpp
46    Plane.hpp
47    Point.hpp
48    Polygon.hpp
49    Primitive.hpp
50    QuadRasterizer.hpp
51    Rasterizer.hpp
52    Renderer.hpp
53    RoutineCache.hpp
54    Sampler.hpp
55    SetupProcessor.hpp
56    Stream.hpp
57    Surface.hpp
58    TextureStage.hpp
59    Triangle.hpp
60    Vector.hpp
61    Vertex.hpp
62    VertexProcessor.hpp
63)
64
65add_library(gl_renderer EXCLUDE_FROM_ALL
66    ${RENDERER_SRC_FILES}
67)
68
69set_target_properties(gl_renderer PROPERTIES
70    POSITION_INDEPENDENT_CODE 1
71    FOLDER "SwiftShader GL"
72)
73
74target_include_directories(gl_renderer
75    PUBLIC
76        ".."
77)
78
79target_compile_definitions(gl_renderer
80    PRIVATE
81        "NO_SANITIZE_FUNCTION="
82)
83
84target_compile_options(gl_renderer
85    PRIVATE
86        ${ROOT_PROJECT_COMPILE_OPTIONS}
87)
88
89target_link_options(gl_renderer
90    PUBLIC
91        ${SWIFTSHADER_LINK_FLAGS}
92)
93
94target_link_libraries(gl_renderer
95    PUBLIC
96        gl_shader
97)
98