[CMake] Combined Static Libraries

Daniel J. Hilferty daniel at hilferty.org
Sun Aug 6 12:48:18 EDT 2006


Would including the source increase compile time with CMake?   Since 
these libraries should only need to be built once, I would hate to 
recompile them every time I build the library.

Dan

William A. Hoffman wrote:
> At 10:19 AM 8/6/2006, Daniel J. Hilferty wrote:
>   
>>   Currently, we support Windows, Linux and OS X.   We are hoping that CMake would allow us to support MinGW as well.   For Windows builds - because these libraries are not standard, we do actually include the code for zlib, IJG (jpeg) and png with the distribution.   For Unix builds, we prefer to use the libraries already available on the user's system to prevent conflicts between library versions.
>>   The libraries are all static.  I would like to faithfully re-create our current build process with CMake first -- but we have considered distributing a shared library.  Would using shared libraries solve this problem?
>>     
>
> Some, but not completely you can link a static library into a shared library as long
> as the static library was compile position independent.  But if you are depending on installed
> system libraries, they might be static or shared.  In most cases the installed zlib will be
> shared, so you can do what you want anyway.   I think your best bet is to use the source all
> the time.   That way you can also verify that the versions of the libraries used are compatible
> with your software.
>
> -Bill
>
>
>   



More information about the CMake mailing list