[CMake] Couple of library/link questions
Oliver kfsone Smith
osmith at playnet.com
Wed Mar 21 18:32:08 EDT 2012
Jean-Christophe Fillion-Robin said the following on 3/20/2012 5:54 PM:
> Hi Olivier,
>
> Assuming you have not set the flag, BUILD_SHARED_LIBS [1] set to TRUE,
> I will consider you are building static libraries. If this last
> statement is valid, it seems your approach is the right one.
Ah, I actually expose it as a variable so that the build process can
decide whether they should be shared or not :)
>
> I would also recommend you to read the following entry:
> http://vtk.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F
I did actually look to the FAQ, but I didn't make the connection,
although what I was actually trying to do was make the 3rd library
(libevent) an archive of all the .obj files produced during the
compilation of the first two libraries, rather than an empty stub :) I
realize that this case is slightly trivial, but that's just my working
point in the conversion; there are actually several other
module-libraries which it compiles both into the full libevent lib and
as stand-alone modules to allow end-users to be choosy about which
components they require.
- Oliver
More information about the CMake
mailing list