win_sdk_dir.py 662 B

12345678910111213141516171819202122
  1. # Copyright 2021 The Chromium 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. Helper script to find the Windows SDK directory.
  6. """
  7. from __future__ import print_function
  8. import os
  9. import sys
  10. # Add to the Python path so that we can import vs_toolchain
  11. script_path = os.path.abspath(os.path.dirname(__file__))
  12. build_path = os.path.normpath(os.path.join(script_path, '..', '..', 'build'))
  13. sys.path.append(build_path)
  14. import vs_toolchain
  15. # Print the Windows SDK directory, either a local install or the packaged
  16. # toolchain.
  17. print(vs_toolchain.SetEnvironmentAndGetSDKDir())