[CMake] Multiple Package Generators and add_package command
Orcun Gokbulut
madorcun at gmail.com
Sat Feb 26 07:03:19 EST 2011
I'm trying to find out a way to generate multiple packages from a big
project. There are some patches and hack available but I'm not experienced
cmake user and I can not figure out how to use them.
IMHO, an add_package command can be usefull instead of configuring cpack
variables and including cpack module.
For example;
I have created a library and I want to distribute it. But there is two type
of distribution that I have to create. In the first distributions I include
libraries, sample programs, runtime executives and documentation. In the
other distribution, in addition to the components in the first distribution,
I also want to include source files.
So a script like;
add_package(LibraryDistro COMPONENTS/GROUPS/TARGETS LibA LibB Runtime
SampleA SampleB)
add_package(FullDistro COMPONENTS/GROUPS/TARGETS LibA LibB Runtime SampleA
SampleB SourceFiles)
#then we can use
set (LibraryDistro_PACKAGE_NAME "A Library")
set (LibraryDistro_PACKAGE_VENDOR "Me")
set (FullDistro_PACKAGE_NAME "A Library + Source")
set (FullDistro_PACKAGE_VENDOR "Me")
I think this can be very easy to use and maintain. This is just an sample
there can be other types of commands something like
add_target_to_package, add_component_to_package or
add_component_group_to_package and etc with many different options.
Multiple package generation can same time and effort when maintaining and
deploying multiple configurations of a big project.
Best regards,
Orçun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110226/d34ea549/attachment.htm>
More information about the CMake
mailing list