blob: f83b6792e5233f5b3eed9a1f28f8a9b4759c5ab5 [file] [log] [blame]
# Copyright 2020 The Dawn Authors
#
# 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.
import("../../../scripts/dawn_overrides_with_defaults.gni")
import("${dawn_root}/scripts/dawn_features.gni")
###############################################################################
# Utils for tests and samples
###############################################################################
static_library("utils") {
configs += [
"${dawn_root}/src/dawn/common:internal_config",
"${dawn_root}/src/tint:tint_public_config",
]
sources = [
"BinarySemaphore.cpp",
"BinarySemaphore.h",
"ComboRenderBundleEncoderDescriptor.cpp",
"ComboRenderBundleEncoderDescriptor.h",
"ComboRenderPipelineDescriptor.cpp",
"ComboRenderPipelineDescriptor.h",
"PlatformDebugLogger.h",
"SystemUtils.cpp",
"SystemUtils.h",
"TerribleCommandBuffer.cpp",
"TerribleCommandBuffer.h",
"TestUtils.cpp",
"TestUtils.h",
"TextureUtils.cpp",
"TextureUtils.h",
"Timer.h",
"WGPUHelpers.cpp",
"WGPUHelpers.h",
"WireHelper.cpp",
"WireHelper.h",
]
deps = [
"${dawn_root}/src/dawn:proc",
"${dawn_root}/src/dawn/common",
"${dawn_root}/src/dawn/native:headers",
"${dawn_root}/src/dawn/wire",
"${dawn_spirv_tools_dir}:spvtools_opt",
]
libs = []
frameworks = []
if (is_win && !dawn_is_winuwp) {
sources += [ "WindowsDebugLogger.cpp" ]
} else {
sources += [ "EmptyDebugLogger.cpp" ]
}
if (is_win) {
sources += [ "WindowsTimer.cpp" ]
} else if (is_mac) {
sources += [
"OSXTimer.cpp",
"ObjCUtils.h",
"ObjCUtils.mm",
]
frameworks += [ "QuartzCore.framework" ]
} else {
sources += [ "PosixTimer.cpp" ]
}
public_deps = [ "${dawn_root}/include/dawn:cpp_headers" ]
}