[CMake] Install of library sub-project prior to building application

Richard Offer richard at whitequeen.com
Wed Jun 17 14:20:01 EDT 2009


On Wed, Jun 17, 2009 at 10:02 AM, Tyler Roscoe <tyler at cryptio.net> wrote:

> On Wed, Jun 17, 2009 at 09:54:58AM -0700, Richard Offer wrote:
> > However I need to run the install phase of Poco before the application
> can
> > link to the library - its the install phase of Poco that copies the
> headers
> > and libraries from all its many sub-directories into the single
> > LIBRARY_OUTPUT_PATH.
> >
> > Of course there is no global Poco/install target - so I guess one
> solution
> > would be to work with the Poco team to add that target into their
> > CMakeLists. Are there any other approaches ?
>
> If there is no global Poco/install target, how do you "run the install
> phase of Poco"?
>
> tyler
>


make install in the Poco build directory.

However a make install from the top level doesn't work since it seems its
trying to build all the code first and then install it - rather than a
phased approach of make install for each component.


In previous build systems I've written I have used the phased approach -
make headers; make exports; make ; make installer

where headers installs all the headers for the entire build, exports builds
all the libraries, make then builds all the binaries and make installer
builds the installer/packages.

Is that normal in CMake ? Or is there a better way ?


Part of the root of the question is how to move my mental model of complex
make based builds to the cmake model so that I do it the cmake way rather
than simply resort to make hacks.

richard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090617/15ede7c8/attachment.htm>


More information about the CMake mailing list