I very unsure right now, but I think cpack used to only generate the packages and not install the Project itself.
But currently when running “cpack .” or “cmake … --target package” it attempts to install the project and obviously fails, because it does not have the rights to install things on my system.
Is this intentional? Was this the same behaviour in the past?
CPack always DOES install but to the staging area and then package the result. I vaguely remember thing may go south if you have hardcoded absolute paths as your install destinations.
That’s exactly what I have started doing because some of my dependencies do not behave…
This is example of what I do (in this case I want my program as the only thing in the .tar.gz archive):