• 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(ROOT_PROJECT_LINK_LIBRARIES
21    ${OS_LIBS}
22    ${SWIFTSHADER_LIBS}
23)
24
25set(LIBGL_COMMON_SRC_FILES
26    debug.cpp
27    debug.h
28    Image.cpp
29    Image.hpp
30    MatrixStack.cpp
31    MatrixStack.hpp
32    NameSpace.hpp
33    Object.cpp
34    Object.hpp
35    Surface.hpp
36)
37
38add_library(libGLESCommon
39    ${LIBGL_COMMON_SRC_FILES}
40)
41
42set_target_properties(libGLESCommon PROPERTIES
43    POSITION_INDEPENDENT_CODE 1
44    FOLDER "OpenGL"
45    PREFIX ""
46)
47
48target_include_directories(libGLESCommon
49    PUBLIC
50        ".."
51        "${SWIFTSHADER_DIR}/include"
52        "${SWIFTSHADER_DIR}/src"
53)
54
55target_compile_definitions(libGLESCommon
56    PRIVATE
57)
58
59target_compile_options(libGLESCommon
60    PRIVATE
61        ${ROOT_PROJECT_COMPILE_OPTIONS}
62)
63
64target_link_options(libGLESCommon
65    PUBLIC
66        ${SWIFTSHADER_LINK_FLAGS}
67)
68
69target_link_libraries(libGLESCommon
70    PRIVATE
71        ${ROOT_PROJECT_LINK_LIBRARIES}
72)
73