GYP/V8 - how to generate VS2008 project by default?

609 views Asked by At

I try to build V8 with GYP (Windows 7 x64, VS2008 x32). The problem is that GYP generates VS2010 solution by default. How to change this GYP behavior to get my VS2008 solution? (What file to edit?)

2

There are 2 answers

0
excelcs On BEST ANSWER

Looking at the MSVSVersion.py file

def _CreateVersion(name, path, sdk_based=False):
  """Sets up MSVS project generation.

Setup is based off the GYP_MSVS_VERSION environment variable or whatever is autodetected if GYP_MSVS_VERSION is not explicitly specified.

So in a command window type:

SET GYP_MSVS_VERSION=2008

Then build it:

python build\gyp_v8

And that did generate a VS2008 sln file.

1
Alf On

GYP will detect VS version using environment variables (maybe I had VS2010 previously?). Can manually edit python file in /pylib/gyp/MSVSVersion.py:

def _CreateVersion(name, path, sdk_based=False):
  """Sets up MSVS project generation.
  ...
  return versions[str(name)] //replace with your version

P.S. I tried to specify VS version on command line when generated projects but that didn't work.