[CMake] Combined Static Libraries

Daniel J. Hilferty daniel at hilferty.org
Sat Aug 5 14:01:45 EDT 2006


I am a programmer for the open source graphics library: G3D.  I have 
been evaluating CMake as a replacement for our current build system, but 
I have run into some trouble creating the release libraries.   G3D's 
release libraries include a combination of our own object files and the 
libraries zlib, IJG and png.  For convenience, we link these libraries 
together in our release versions.   I have been unable to figure out how 
to do this with CMake.  
I figured that the line:

TARGET_LINK_LIBRARIES (G3D ${ZLIB_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY})

would link the libraries, but it does not automatically link with zlib, 
IJG and png.  The resulting libraries are useless unless the user 
explicitly links with those libraries.
Does anyone know how to create these combination libraries with CMake?

Thanks for your help,

Dan


More information about the CMake mailing list