[Scons-users] How to correclty use MSVS builder

Pierre-Luc Boily pierreluc.boily at gmail.com
Thu Jan 12 13:51:32 EST 2017


Hello,

I am currently implementing MSVS builder with scons and I have some
questions :

First, see my SConscript here : http://pastebin.com/kW5DfQiZ.  This
Sconconscript does 5 things :
1 - Create a library.
2 - Create a program.
3 - Create a msvs project out of the library.
4 - Create a msvs project out of the program.
5 - Create a msvs solution out of the 2 projects created at step 3 & 4.

This is the output when typing scons msvs: 

_GenerateV10DSP.Parse()
Adding 'libsr_sra_src_flatGui-debug - Debug|Win32' to
'sr\sra\src\flatGui\libsr_sra_src_flatGui-debug.vcxproj'
_GenerateV10DSP.Parse()
Adding 'FlatGuiSpeechController - Debug|Win32' to
'sr\sra\src\flatGui\FlatGuiSpeechController.vcxproj'
Adding 'faa_mxA - Debug|Win32' to
'build\debug\sr\sra\src\flatGui\faa_mxA.sln'



1 - Why project files are created in src dir and solution file in variant
dir only?  Double clicking on the sln from variant dir does not work,
because the path of projects is incorrect (sln tries to open projects local
to him).

2 - If I copy paste my sln file from variant dir to src dir (where my real
projects are), it kind of work but :

a - It says it need to do conversion.  It is strange because SCons uses
version 10 and I have visual studio 2010.  Does that message is normal?

b - My sln also have .vcxproj.filters in it.  Filters file has been added
into sln, is it necessary?

3 - I would like one sln file at the root for all my projects created over
150 SConscript files.    The idea I have is to accumulate all targets
created by MSVSProject, return them to SConstruct and let SConsctruct create
the solution with MSVSSolution(my_150_project).
How to elegantly accumulate targets in all SConscript and return them to
SConscruct?  Could I simply add a return statement in SConscript?  Or maybe
you  have a better approach to do this?

4 - I have SConscript creating library in both win32 and win64 architecture. 
I guess I would need 2 variants, something like this? : 

buildtarget = [tgt[0]]*2,
variant = 'Debug|win32', 'Debug|win64',
                                     
5 - Will SCons automagically knows which environment to call depending which
variant will be selected into visual studio?

thx
                                     



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


More information about the Scons-users mailing list