[CMake] INSTALL dependencies
Andreas Pakulat
apaku at gmx.de
Wed Jan 28 18:10:20 EST 2009
On 28.01.09 23:58:26, Pau Garcia i Quiles wrote:
> On Wed, Jan 28, 2009 at 11:41 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> > On 28.01.09 22:58:04, Pau Garcia i Quiles wrote:
> >> On Wed, Jan 28, 2009 at 10:39 PM, Alexander Neundorf
> >> <a.neundorf-work at gmx.net> wrote:
> >> > On Wednesday 28 January 2009, Pau Garcia i Quiles wrote:
> >> >> Hello,
> >> >>
> >> >> Is it possible to install a target's dependencies using the INSTALL(
> >> >> TARGET ... ) signature? I. e. something like INSTALL ( TARGET mytarget
> >> >> INSTALL_DEPENDENCIES ) which goes through the parameters of
> >> >> TARGET_LINK_LIBRARIES and installs them too.
> >> >
> >> > Like this ?
> >> > http://public.kitware.com/Bug/view.php?id=4266
> >>
> >> More or less. In that bug report, you talk about building and
> >> installing libraries which are built by the CMake build system you
> >> have in place.
> >>
> >> The main purpose I had when I proposed INSTALL ( TARGET ...
> >> INSTALL_DEPENDENCIES ) was a bit broader: have "make install" install
> >> not only the depending libraries I build with CMake but also the
> >> third-party libraries I find with FIND_PACKAGE( ... ) and use in
> >> TARGET_LINK_LIBRARIES.
> >
> > But why? You've already found them, so they are already installed. There's
> > no point in installing them again. I guess you actually want to create a
> > distributable package of your app containing all dependencies? For that
> > install is IMHO simply the wrong tool.
>
> No, you are wrong.
I can live with that :)
> For instance, in our case Windows developers have a "3rdparty"
> directory which contains compiled versions of all the libraries we use
> for all our projects, for all the compilers we develop with. That
> "3rdparty" directory is a svn external in the svn repository for each
> project:
....
> By means of CMAKE_PREFIX_PATH, INCLUDE_DIRECTORIES(), etc you can find
> the libraries and header files and not have them installed. So no,
> finding the libraries and header files does not imply they are
> installed.
IMHO the cmake project architecture implies exactly that. Install is
supposed to install your project, anything you find with find_library&Co is
simply not part of your project, those are external dependencies. Wether or
not you keep them in the same VCS is completely irrelevant.
> When I develop an application which uses Qwt5, Qt4 and OSG, it would
> be convenient that a "nmake install" would install my application and
> the Qwt5, Qt4 and OSG DLLs in the same directory (using RUNTIME
> DESTINATION, LIBRARY DESTINATION, etc) without me having to INSTALL(
> FILES ... ) or INSTALL( PROGRAMS ... ).
Why install those at all, you already have them on your disk, just use the
one from the external. Thats convenient (and uses a lot less disk space,
looking at the list of libs you have).
Personally I'm using simple cmd files that set my env up for a particular
compiler+libraries I want to use (when I have to work with that OS) and
then just build+run projects from that environment.
Andreas
--
A visit to a fresh place will bring strange work.
More information about the CMake
mailing list