-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support building with VS2017 and VS2019
- Loading branch information
1 parent
22c042a
commit 2638bc7
Showing
5 changed files
with
50 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2019 Google Inc. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import sys | ||
|
||
''' | ||
Look for the first match in the format | ||
C:\\Program Files (x86)\\Microsoft Visual Studio\\${RELEASE}\\${VERSION}\\VC | ||
''' | ||
def find_msvc(): | ||
if sys.platform.startswith('win'): | ||
default_dir = r'C:\Program Files (x86)\Microsoft Visual Studio' | ||
for release in ['2019', '2017']: | ||
for version in ['Enterprise', 'Professional', 'Community', 'BuildTools']: | ||
path = os.path.join(default_dir, release, version, 'VC') | ||
if os.path.isdir(path): | ||
return path | ||
return None | ||
|
||
if __name__ == '__main__': | ||
result = find_msvc() | ||
if result: | ||
sys.stdout.write(result + '\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters