1# Copyright 2014 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5declare_args() { 6 # Path to Visual Studio. If empty, the default is used which is to use the 7 # automatic toolchain in depot_tools. If set, you must also set the 8 # visual_studio_version, wdk_path and windows_sdk_version. 9 visual_studio_path = "" 10 11 # Version of Visual Studio pointed to by the visual_studio_path. 12 visual_studio_version = "" 13 14 # Directory of the Windows driver kit. If visual_studio_path is empty, this 15 # will be auto-filled. 16 wdk_path = "" 17 18 # Full path to the Windows SDK, not including a backslash at the end. 19 # This value is the default location, override if you have a different 20 # installation location. 21 windows_sdk_path = "C:\Program Files (x86)\Windows Kits\10" 22 23 # Version of the Windows SDK pointed to by the windows_sdk_path. 24 windows_sdk_version = "" 25} 26 27if (visual_studio_path == "") { 28 toolchain_data = 29 exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope") 30 visual_studio_path = toolchain_data.vs_path 31 windows_sdk_version = toolchain_data.sdk_version 32 windows_sdk_path = toolchain_data.sdk_path 33 visual_studio_version = toolchain_data.vs_version 34 wdk_path = toolchain_data.wdk_dir 35 visual_studio_runtime_dirs = toolchain_data.runtime_dirs 36} else { 37 assert(visual_studio_version != "", 38 "You must set the visual_studio_version if you set the path") 39 assert(windows_sdk_version != "", 40 "You must set the windows_sdk_version if you set the path") 41 assert(wdk_path != "", 42 "You must set the wdk_path if you set the visual studio path") 43 visual_studio_runtime_dirs = [] 44} 45