On Sun, 29 Jun 2014 10:26:13 -0700 'Ray Satiro' via wx-dev wrote:
RS> I use Visual Studio 2010, 2012 and 2013 and I wanted to build
RS> several versions of the wxWidgets library. The file
RS> docs/msw/install.txt says that a local.props file can be used to
RS> override the property wxCompilerPrefix, among others.
The thing that it doesn't say is that you actually need to copy
wx_vcN_wx_setup.props to wx_vcN_local.props and only then modify it. I.e.
the local.props file needs to contain everything and not just the options
that you want to change. I agree that it's somewhat counterintuitive and at
the very least should be explained better.
RS> Another way to allow the user to override those properties while still
RS> allowing the composite properties to receive the overridden values is
RS> to import the local.props in setup.props after the base property
RS> groupis defined but before the composite properties, so when Visual
RS> Studio reads it in it looks like this:
RS>
RS> --wx_vc12_wx_setup.props--
RS> <wxCompilerPrefix>vc</wxCompilerPrefix>
RS> <Import Condition="Exists('wx_vc12_local.props')" Project="wx_vc12_local.props"/>
RS> --wx_vc12_local.props--
RS> <wxCompilerPrefix>vc120</wxCompilerPrefix>
RS> --
RS> <wxOutDir>..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_dll$(wxCfg)\</wxOutDir>
RS> --
RS>
RS> wxCompilerPrefix == vc120
RS> wxOutDir == ..\..\lib\vc120_dll\
RS>
RS> By doing it that way anything above the import line is overridden but
RS> below the import line is not. Ultimately though that is the change I
RS> made to get it working. And I updated the install document to reflect
RS> that Visual Studio 2010 can also have a props file. You can view the
RS> two commits here and the commit messages by clicking on each ...
RS>
RS>
https://github.com/jay/wxWidgets/compare/d201caa...propsfix1
I rather like this. Artur, do you see any problems with doing it like
this?
RS> If you accept these changes please let me know how you want me to
RS> proceed.
The troublesome thing is that we're going to replace the current projects
from the ones from this message:
https://groups.google.com/d/msg/wx-dev/WZhS_Jh3zD4/EORznSIw3UYJ
soon, so the patch is not going to apply anyhow. OTOH it is simple enough
to be reapplied manually to the new projects, I think.
RS> As I said I cannot post on the tracker. It looks like this is an
RS> ongoing issue not just for me so I will stay subscribed to this e-mail
RS> list for now.
This should be fixed now, sorry about that problem.
RS> Two other notes that may help anyone making multiple builds. I wanted
RS> to run the samples but those are all based on the generic vc
RS> directories
IMHO the simplest way to build the samples when using non-default compiler
prefix is by using nmake with COMPILER_PREFIX=vc120 (or whatever) on its
command line. The main problem with nmake is lack of dependencies and,
also, that it doesn't build in parallel, but both matter much less for the
samples than for the library itself.
RS> Another thing bothering me was there's no ignore list in the repo for
RS> the files Visual Studio versions create so I added my own to
RS> .git/info/exclude (my local gitignore):
RS> include/wx/msw/setup.h
RS> build/msw/*_local.props
RS> build/msw/*.opensdf
RS> build/msw/*.sdf
RS> build/msw/*.suo
RS> build/msw/*.user
RS> build/msw/enc_temp_folder/
RS> build/msw/ipch/
RS> build/msw/vc*/
RS> lib/vc*/
Yes, we should have .gitignore, I have pretty much the same locally too
and I guess everybody else does as well. Although I don't know what are
enc_temp_folder and ipch directories, I don't have those.
Regards,
VZ