blob: 5c6c6c9d31b4f62434af9d856d3ad53f260353a3 [file] [log] [blame]
Dan Sinclair6e581892020-03-02 15:47:43 -05001# 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
15set(TINT_SRCS
16 main.cc
17)
18
19## Tint executable
20add_executable(tint ${TINT_SRCS})
Dan Sinclair6e581892020-03-02 15:47:43 -050021tint_default_compile_options(tint)
Ben Claytona70c14d2021-06-02 21:02:34 +000022target_link_libraries(tint libtint tint_val)
dan sinclair4b71b9e2020-03-18 14:08:48 +000023
24if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})
25 target_link_libraries(tint SPIRV-Tools)
26endif()
27
Stephen White7cf3b282021-10-14 14:39:36 +000028if(${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()
39endif()