Skip to content

Conversation

@scheibel
Copy link
Member

This enables the combination of the -DCMAKE_INSTALL_COMPONENT variable with the DESTDIR convention of GNU make install (https://www.gnu.org/prep/standards/html_node/DESTDIR.html).

The CMake OPTION_DEPLOY_DESTDIR option (actually, a cached string variable) is added for Linux systems that takes the value of the DESTDIR parameter/macro/environment variable and generates one target per component (destdir-deploy-${component}) that calls the preinstall target and later executes the install with the DESTDIR construct and the current component.

With this extension it is possible to deploy only parts of the CMake components for a debian source package. A typical workflow would be:

> cd build
build > cmake .. -DOPTION_DEPLOY_DESTDIR=debian/tmp
build > make destdir-deploy-runtime
build > cd ..
> dpkg-gencontrol -pcmake-init
> dpkg --build debian/tmp

@scheibel scheibel changed the title Emulate DESTDIR behavior for per-component deployment Emulate DESTDIR behavior for per-component PPA deployment Jan 27, 2016
@scheibel
Copy link
Member Author

Closed in favor of a more elegant solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants