[CMake] [CPack] Avoiding packaging (some) dependencies
Drago Trusk
drago.trusk at gmail.com
Wed May 16 03:33:10 EDT 2018
Hi everyone,
I have particular problem which I'm unable to solve.
Lets say there are following components:
- Main: library/executable
- Ignorable: Main requires it to build, but not for packaging
Main simply defines:
add_dependencies(Main Ignorable)
FindIgnorable.cmake contains something like:
add_custom_target(Ignorable
COMMAND ... ... && cmake --build --target install .
# ...
)
Problem is that deb cpack generator picks this from install tree (tar/zip
doesn't contain Ignorable). So deb ends up with:
# ... correct fs hierarchy
/home/saduser/projects/ignorableinstall
I need to avoid dependency used only for building artifacts.
What I found:
- Remove add_dependency
---- Problem: have to build dependencies manually and will break CI and
other people builds
- Disable automatic packaging of everything and specify custom components
to package
---- Problem: Dependency tree which might be bigger and requires to know
too many details. In addition requires for outside changes so that all
targets have (appropriate) install conponents.
I tried everything else that is possible. Am i missing something or are
those two only viable options?
Bye,
Drago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180516/0c4a1ccf/attachment-0001.html>
More information about the CMake
mailing list