2016-12-21 12:29 GMT+01:00 Dvir Yitzchaki <dvir.yitzch...@ceva-dsp.com>:

> Thanks, but as I understand a component can only belong to one group.
>
> How can I get the same component/target on multiple packages?
>

Usually you wouldn't want to package same file on same location with same
filename since during unpackaging they would override each other so this is
not supported out of the box.

Usually in such cases I would split packages even further so that one
package would be base package of others (but automatic dependency tracking
between them would require something more sophisticated than zip - RPM, Deb
or some other CPack supported packager perhaps).

However if you really need to do something like that you could write a
function that you would call instead of install(...) command which would
just forward to it and the first parameter would have a list of components
to which the file should belong. For e.g. some pseudo code:

function(my_install my_list other_params_that_get_forwarded...)
    foreach(component_name_ IN LISTS my_list)
        install(other_params_that_get_forwarded... COMPONENT
${component_name_})
    endforeach()
endfunction()

my_install("first;second;and_anotherone" "TARGETS target_name" "DESTINATION
some_dir")

Hope this helps.

Regards,
Domen
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to