diff -r f3abdaa2e8fb -r c005054bf4c1 SConstruct --- a/SConstruct Sun May 31 16:53:05 2009 +0200 +++ b/SConstruct Sun May 31 23:06:03 2009 +0200 @@ -24,6 +24,8 @@ no-download = (libs, demos, local-models) - everything but docs and downloadable models + vcproj - generate project files for Visual C++ Studio + Default target is no-download. Options: @@ -235,7 +237,8 @@ # configure libpng -if conf.CheckLibWithHeader('zlib', 'zlib.h', 'C') and conf.CheckLibWithHeader('libpng', 'png.h', 'C'): +conf.CheckLibWithHeader('zlib', 'zlib.h', 'C') +if conf.CheckLibWithHeader('libpng', 'png.h', 'C'): conf.Define('HAVE_PNG') env = conf.Finish() @@ -301,11 +304,11 @@ Export('env pyenv sdlenv have_sdl cc') lib = SConscript('src/SConscript', build_dir='build/lib', duplicate=0, exports={'buildmodule':False}) -pymodule = SConscript('src/SConscript', build_dir='build/pymodule', duplicate=0, +(pymodule, modvcproj) = SConscript('src/SConscript', build_dir='build/pymodule', duplicate=0, exports={'buildmodule':True}) -SConscript('ccdemos/SConscript', build_dir='build/ccdemos', duplicate=0, exports='lib') -SConscript('demos/SConscript', exports='pymodule') +ccdemvcproj = SConscript('ccdemos/SConscript', build_dir='build/ccdemos', duplicate=0, exports='lib') +demosvcproj = SConscript('demos/SConscript', exports='pymodule') SConscript('tests/SConscript', build_dir='build/tests', duplicate=0, exports='lib') SConscript('models/SConscript') @@ -318,3 +321,11 @@ env.Alias('all', ['no-docs', 'docs']) env.Alias('pyrit', 'no-download') Default('pyrit') + +vcsol = env.MSVSSolution( + target = 'pyrit' + env['MSVSSOLUTIONSUFFIX'], + projects = [modvcproj, ccdemvcproj, demosvcproj], + variant = 'Release') + +env.Depends(vcsol, [modvcproj, ccdemvcproj, demosvcproj]); +env.Alias('vcproj', vcsol)