| # Copyright (C) 2019 Google, Inc. |
| # SPDX-License-Identifier: Apache-2.0 |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| config("spirv_cross_public") { |
| include_dirs = [ ".." ] |
| |
| defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ] |
| } |
| |
| source_set("spirv_cross_sources") { |
| public_configs = [ ":spirv_cross_public" ] |
| |
| sources = [ |
| "../GLSL.std.450.h", |
| "../spirv.hpp", |
| "../spirv_cfg.cpp", |
| "../spirv_cfg.hpp", |
| "../spirv_common.hpp", |
| "../spirv_cross.cpp", |
| "../spirv_cross.hpp", |
| "../spirv_cross_containers.hpp", |
| "../spirv_cross_error_handling.hpp", |
| "../spirv_cross_parsed_ir.cpp", |
| "../spirv_cross_parsed_ir.hpp", |
| "../spirv_cross_util.cpp", |
| "../spirv_cross_util.hpp", |
| "../spirv_glsl.cpp", |
| "../spirv_glsl.hpp", |
| "../spirv_hlsl.cpp", |
| "../spirv_hlsl.hpp", |
| "../spirv_msl.cpp", |
| "../spirv_msl.hpp", |
| "../spirv_parser.cpp", |
| "../spirv_parser.hpp", |
| "../spirv_reflect.cpp", |
| "../spirv_reflect.hpp", |
| ] |
| |
| if (!is_win) { |
| cflags = [ "-fno-exceptions" ] |
| } |
| |
| if (is_clang) { |
| cflags_cc = [ |
| "-Wno-extra-semi", |
| "-Wno-ignored-qualifiers", |
| "-Wno-implicit-fallthrough", |
| "-Wno-inconsistent-missing-override", |
| "-Wno-missing-field-initializers", |
| "-Wno-newline-eof", |
| "-Wno-sign-compare", |
| "-Wno-unused-variable", |
| ] |
| } |
| } |