Dan Sinclair | 6e58189 | 2020-03-02 15:47:43 -0500 | [diff] [blame] | 1 | # Copyright 2020 The Tint Authors. |
| 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 | set(TINT_SRCS |
| 16 | main.cc |
| 17 | ) |
| 18 | |
| 19 | ## Tint executable |
| 20 | add_executable(tint ${TINT_SRCS}) |
Dan Sinclair | 6e58189 | 2020-03-02 15:47:43 -0500 | [diff] [blame] | 21 | tint_default_compile_options(tint) |
Ben Clayton | a70c14d | 2021-06-02 21:02:34 +0000 | [diff] [blame] | 22 | target_link_libraries(tint libtint tint_val) |
dan sinclair | 4b71b9e | 2020-03-18 14:08:48 +0000 | [diff] [blame] | 23 | |
| 24 | if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER}) |
| 25 | target_link_libraries(tint SPIRV-Tools) |
| 26 | endif() |
| 27 | |
Stephen White | 7cf3b28 | 2021-10-14 14:39:36 +0000 | [diff] [blame] | 28 | if(${TINT_BUILD_GLSL_WRITER}) |
| 29 | target_link_libraries(tint glslang) |
| 30 | target_link_libraries(tint glslang-default-resource-limits) |
| 31 | if(NOT MSVC) |
| 32 | target_compile_options(tint PRIVATE |
| 33 | -Wno-reserved-id-macro |
| 34 | -Wno-shadow-field-in-constructor |
| 35 | -Wno-shadow |
| 36 | -Wno-weak-vtables |
| 37 | ) |
| 38 | endif() |
| 39 | endif() |