Hi Alex,

Wouldn't the command:
cmake -DCMAKE_INSTALL_COMPONENT=Headers -P cmake_install.cmake

overwrite the very makefiles that are executing that command?  If so,
does that mess up the state of the Make process that's invoking the
cmake command shown above?

I'm thinking that in order to safely perform the command like that
above, I'd need to somehow do this:
1. create two new empty directories, Foo and Bar.
2. invoke that cmake statement you provided, in a way that will use
'Foo' as its CMAKE_BINARY_DIRECTORY
3. cd to Foo
4. invoke "make install DESTDIR=Bar"

And since my overall goal is to produce a different Debian .deb
package for each distinct install-component...

5. Do my dpkg-deb actions to package the contents of Bar.

Can you think of some reason that these 5 steps aren't necessary?

Thanks,
Christian

On 7/26/07, Alexander Neundorf <[EMAIL PROTECTED]> wrote:
On Thursday 26 July 2007 11:25, Christian Convey wrote:
> I'd like "make install" to install different (named) subsets of files,
> depending on my needs.  For example, "make output=header-files
> install" or "make output=libraries install".
>
> Is what I'm trying to accomplish even possible?

Yes.

You need to use the new INSTALL() commands together with the COMPONENT
argument.
So e.g.
install(FILE foo.h bar.h DESTINATION include COMPONENT Headers)
install(TARGETS mylib    DESTINATION lib     COMPONENT Libraries)
etc.
The names of the components can be chosen freely (don't use "Default").

You still can do only "make install", but you can execute the install script
manually, that's the same as what make install does:
$ cmake -DCMAKE_INSTALL_COMPONENT=Headers -P cmake_install.cmake

If it doesn't work, let us know.

Bye
Alex
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to