An elegant way, no, though I'd love to hear if anyone has figured it out.
In Visual Studio, I use batch builds. I've also seen environments that set them up as two separate projects. Neither is ideal, though the former is easier in practice.
annulen | 30 Nov 2011 14:51
My primary target is gmake, so batch build is not a proper solution for me :)
I was thinking into direction of doing a deep copy of project table, than setting
* different name ("projectname_static")
* the same tagetname
* customizable targetdir (to prevent possible collision with implib on Windows).
However doing this stuff immediately in project file (i.e. before baking) seems error-prone to me, because project description could be split into several parts.
So I'm leaning towards the next solution:
* Add flag "SharedAndStatic", creating StaticLib projects from SharedLib projects if set on them
* Add API function "staticlibdir" (using patch [1])
* Do things mentioned in previous paragraph after baking using the same hack I've used for Qt (action chain [2])
Will implement it (as an addon) if nobody suggests something simpler.
An elegant way, no, though I'd love to hear if anyone has figured it out.
In Visual Studio, I use batch builds. I've also seen environments that set them up as two separate projects. Neither is ideal, though the former is easier in practice.
My primary target is gmake, so batch build is not a proper solution for me :)
I was thinking into direction of doing a deep copy of project table, than setting
* different name ("projectname_static")
* the same tagetname
* customizable targetdir (to prevent possible collision with implib on Windows).
However doing this stuff immediately in project file (i.e. before baking) seems error-prone to me, because project description could be split into several parts.
So I'm leaning towards the next solution:
* Add flag "SharedAndStatic", creating StaticLib projects from SharedLib projects if set on them
* Add API function "staticlibdir" (using patch [1])
* Do things mentioned in previous paragraph after baking using the same hack I've used for Qt (action chain [2])
Will implement it (as an addon) if nobody suggests something simpler.
[1] https://sourceforge.net/tracker/?func=detail&aid=3440471&group_id=71616&...
[2] http://industriousone.com/topic/chaining-actions