[CMake] MSVC7.1 static link question

Bill Hoffman bill.hoffman at kitware.com
Thu Feb 12 11:47:40 EST 2009


Luigi Calori wrote:

> I' ma bit confused, just to make clear: the proposed import method  are 
> used in the  final projects that USES the libraries.
> by install(EXPORT) the needed code is hidden in a config--baz--cmake 
> file that is evaluated inby the final project tha so does not have to 
> rely on FindBAZ script.
> But effectively this is just a way to hide the fact that  the final 
> project  links to both libbaz and libbar
> 
> The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce a 
> bigger library tha has both baz and bar, and can be used straight, at 
> least under VS7.1
> 
> I appreciate the IMPORT and EXPORT stuff and will try to use that (could 
> we use that also for the whole OpenSceneGraph itself ? what do you think 
> Philip?)
> Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler

But not as portable.  The IMPORT/EXPORT will work cross platform and 
with many different compilers.

-Bill


More information about the CMake mailing list