1# Copyright 2020 The ANGLE Project Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4# 5# This file houses the build configuration for the ANGLE D3D back-ends. 6 7import("../../../../gni/angle.gni") 8import("d3d_backend.gni") 9 10assert(angle_enable_d3d11 || angle_enable_d3d9) 11 12config("angle_d3d_shared_config") { 13 defines = [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ] 14} 15 16angle_source_set("angle_d3d_shared") { 17 sources = d3d_shared_sources 18 public_deps = [ 19 "$angle_root:angle_d3d_format_tables", 20 "$angle_root:angle_gpu_info_util", 21 "$angle_root:angle_image_util", 22 "$angle_root:libANGLE_headers", 23 ] 24 public_configs = [ ":angle_d3d_shared_config" ] 25} 26 27if (angle_enable_d3d9) { 28 config("angle_d3d9_backend_config") { 29 defines = [ "ANGLE_ENABLE_D3D9" ] 30 ldflags = [ "/DELAYLOAD:d3d9.dll" ] 31 } 32 33 angle_source_set("angle_d3d9_backend") { 34 sources = d3d9_backend_sources 35 libs = [ 36 "d3d9.lib", 37 "delayimp.lib", 38 ] 39 public_deps = [ ":angle_d3d_shared" ] 40 public_configs = [ ":angle_d3d9_backend_config" ] 41 } 42} 43 44if (angle_enable_d3d11) { 45 config("angle_d3d11_backend_config") { 46 defines = [ "ANGLE_ENABLE_D3D11" ] 47 if (angle_enable_d3d11_compositor_native_window) { 48 defines += [ "ANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW" ] 49 } 50 } 51 52 angle_source_set("angle_d3d11_backend") { 53 sources = d3d11_backend_sources 54 55 libs = [ "dxguid.lib" ] 56 57 public_deps = [ ":angle_d3d_shared" ] 58 public_configs = [ ":angle_d3d11_backend_config" ] 59 } 60 61 config("angle_enable_winuwp_config") { 62 defines = [ "ANGLE_ENABLE_WINDOWS_UWP=1" ] 63 if (angle_is_winappsdk) { 64 libs = [ "WindowsApp.lib" ] 65 defines += [ "ANGLE_ENABLE_WINDOWS_APP_SDK=1" ] 66 include_dirs = [ "$winappsdk_dir/include" ] 67 lib_dirs = [ "$winappsdk_dir/lib/win10-${target_cpu}" ] 68 } 69 } 70 71 angle_source_set("angle_enable_winuwp") { 72 public_configs = [ ":angle_enable_winuwp_config" ] 73 } 74} 75