Index: pylib/gyp/msvs_emulation.py |
diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py |
index 4a55aca05751de49c017caf98c6ed870d0f8556a..9a668c8d3b586ead3625fc856294e4c5e70abe7b 100644 |
--- a/pylib/gyp/msvs_emulation.py |
+++ b/pylib/gyp/msvs_emulation.py |
@@ -113,6 +113,9 @@ def _FindDirectXInstallation(): |
"""Try to find an installation location for the DirectX SDK. Check for the |
standard environment variable, and if that doesn't exist, try to find |
via the registry. May return None if not found in either location.""" |
+ if sys.platform not in ('win32', 'cygwin'): |
+ return '' |
Nico
2012/08/14 21:36:26
Why do you need this?
Sam Clegg
2012/08/14 22:36:57
It allows me to do --format=ninja-win on my linux
Nico
2012/08/14 22:42:26
That sounds unrelated to what this CL is about the
|
+ |
# Return previously calculated value, if there is one |
if hasattr(_FindDirectXInstallation, 'dxsdk_dir'): |
return _FindDirectXInstallation.dxsdk_dir |
@@ -678,6 +681,8 @@ def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags, open_out): |
an absolute path, instead preferring something like "cl.exe" in the rule |
which will then run whichever the environment setup has put in the path.""" |
vs = GetVSVersion(generator_flags) |
+ if sys.platform not in ('win32', 'cygwin'): |
+ return |
for arch in ('x86', 'x64'): |
args = vs.SetupScript(arch) |
args.extend(('&&', 'set')) |