Yes, this is so that
find_package(VTK) works the same for a build tree as for an install tree. It’s complicated enough as it is without having to support skewed directory layouts.
Not easily. Various parts set these variables as needed. Linux and macOS also do it so that relative rpath information is the same between the build and install trees. For example, the Python and Java wrappers modify the variables to place things where they need to be for how they expect things to work. The module system also places other things relative to the libraries (e.g., CMake package information and wrapper hierarchy data).
If you need VTK to place its libraries somewhere specific, I would recommend skipping the top-level
CMakeLists.txt, including whatever support stuff you need from
CMake/ and performing the scan and build yourself. Here is how ParaView builds its embedded VTK while bridging its settings over to what names VTK uses internally for various ones. You can either pass whatever you want to the various
_DESTINATION arguments to
vtk_module_build or let it set it up based on the
CMAKE_INSTALL_*DIR variables as needed. But the install and build trees are going to have the same layout just so that some sanity is preserved .