[CMake] Install selected|group of targets
Joakim Hove
joakim.hove at gmail.com
Wed Feb 1 06:13:18 EST 2012
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?
Any tips?
Joakim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120201/8f56a27c/attachment-0001.htm>
More information about the CMake
mailing list