| 1 |
# Copyright (C) 2019 Google, Inc. |
| 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 |
# |
| 15 |
|
| 16 |
config("spirv_cross_public") { |
| 17 |
include_dirs = [ ".." ] |
| 18 |
|
| 19 |
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ] |
| 20 |
} |
| 21 |
|
| 22 |
source_set("spirv_cross_sources") { |
| 23 |
public_configs = [ ":spirv_cross_public" ] |
| 24 |
|
| 25 |
sources = [ |
| 26 |
"../GLSL.std.450.h", |
| 27 |
"../spirv.hpp", |
| 28 |
"../spirv_cfg.cpp", |
| 29 |
"../spirv_cfg.hpp", |
| 30 |
"../spirv_common.hpp", |
| 31 |
"../spirv_cross.cpp", |
| 32 |
"../spirv_cross.hpp", |
| 33 |
"../spirv_cross_containers.hpp", |
| 34 |
"../spirv_cross_error_handling.hpp", |
| 35 |
"../spirv_cross_parsed_ir.cpp", |
| 36 |
"../spirv_cross_parsed_ir.hpp", |
| 37 |
"../spirv_cross_util.cpp", |
| 38 |
"../spirv_cross_util.hpp", |
| 39 |
"../spirv_glsl.cpp", |
| 40 |
"../spirv_glsl.hpp", |
| 41 |
"../spirv_msl.cpp", |
| 42 |
"../spirv_msl.hpp", |
| 43 |
"../spirv_parser.cpp", |
| 44 |
"../spirv_parser.hpp", |
| 45 |
"../spirv_reflect.cpp", |
| 46 |
"../spirv_reflect.hpp", |
| 47 |
] |
| 48 |
|
| 49 |
cflags = [ "-fno-exceptions" ] |
| 50 |
|
| 51 |
if (is_clang) { |
| 52 |
cflags_cc = [ |
| 53 |
"-Wno-extra-semi", |
| 54 |
"-Wno-ignored-qualifiers", |
| 55 |
"-Wno-implicit-fallthrough", |
| 56 |
"-Wno-inconsistent-missing-override", |
| 57 |
"-Wno-missing-field-initializers", |
| 58 |
"-Wno-newline-eof", |
| 59 |
"-Wno-sign-compare", |
| 60 |
"-Wno-unused-variable", |
| 61 |
] |
| 62 |
} |
| 63 |
} |