[Scons-users] How to correclty use MSVS builder

Pierre-Luc Boily pierreluc.boily at gmail.com
Fri Jan 20 20:51:10 EST 2017


In case where someone has same questions has mine, I will post solution I
found : 

1 - First problem was MSVSProject generating project file in both variant
dir and src dir.  I did the following workaround to resolve the problem, in
my SConsctruct :

    vcxprojList = []
    for script in getSConscript():
        if 'msvs' in COMMAND_LINE_TARGETS:
            SConscript(str(script).strip(), exports='envService
vcxprojList', duplicate=0)
        else:
            variantDir = 
os.path.join(envService.get_envWin32()['VARIANTDIRROOT'],
envService.get_envWin32()['BUILDMODE'], os.path.dirname(script)[2:])
            SConscript(str(script).strip(), exports='envService
vcxprojList', variant_dir=variantDir, duplicate=0)
    
    Alias('msvs', envService.get_envWin32().MSVSSolution(target = 'faa_mxA'
+ envService.get_envWin32()['MSVSSOLUTIONSUFFIX'],
                                                         projects =
vcxprojList,
                                                         variant = 'Debug'))

If you type scons msvc, no variant dir is given to SConscript, then, msvs
project file is generated only src dir.

2 - My other problem was a misusing of Default and Alias.  I realized that
for "scons msvs", Alias is enough.  I did something like that in my
SConscript : 

msvsPrj = env.MSVSProject(...)
env.Alias('msvs', msvsPrj)

et voilà



--
View this message in context: http://scons.1086193.n5.nabble.com/How-to-correclty-use-MSVS-builder-tp40958p40970.html
Sent from the Users mailing list archive at Nabble.com.


More information about the Scons-users mailing list