2012/2/1 Joakim Hove <joakim.h...@gmail.com>:
> Hello;
>
> I have a quite large CMake project consisting of many libraries and
> executable programs. Schematically my codebase is organised as:
>
>
>
> root/CMakeLists.txt
> root/package1/CMakeLists.txt
> root/package1/lib/CMakeLists.txt
> root/package1/app/CMakeLists.txt
> root/package2/CMakeLists.txt
> root/package2/lib/CMakeLists.txt
> root/package2/app/CMakeLists.txt
> ....
>
> The CMakeLists.txt files in each of the lib directories contain
>
> add_library( pack1 ...)
>
> And in the app directories there are
>
> add_executable(app1 ...)
> add_executable(app2 ...)
>
> Now I would like to be able to install a group of libraries / executables as
> e.g.
>
> make install package2
>
> To install all the libraries and binaries under the package2/ subdirectory.
> The documentation says that something like this should be possible through
> the use of COMPONENTS - but just how is less than clear for me?

First you should use the COMPONENT parameter of the INSTALL command.
See:
cmake --help-command install
and
http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack

then you may install all the target/files/... belonging to a
particular component by doing:

cd buildir
cmake -DCOMPONENT="componentname" -P cmake_install.cmake


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to