cmake: offer command-line abstraction for install scripts
Currently one may use cmake --build . --target install
to build and install.
!3069 (merged) proposes a cmake --install .
variant. Discussion there raised a few points that would be better worked out in an issue first, so I'm opening this.
Concerns include:
-
cmake --install .
is a sensible abstraction over the currentcmake ... -P cmake_install.cmake
support. - When does installation also build?
- Re-linking (
make preinstall
) may be needed before directly invokingcmake_install.cmake
scripts. - The Ninja generator does not provide the
preinstall
target. This is an existing limitation that should be worked out regardless of the rest of this issue.
Edited by Brad King