I'm installing a package that was built with CMake. It installs header files in a nonstandard location. Is there a variable I can use at installation time to change that path?
The current CMake invocation is:
cmake /p/a/t/h -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
I'm looking for -DCMAKE_INSTALL_INCDIR
or -DCMAKE_INCLUDE_DIR
or -DCMAKE_INCLUDE_HEADERDIR
, or something.
(For example, I'm trying to accomplish what would be done with configure --includedir=/usr/include
using an autoconf generated configure script.)
Generally, CMake packages needn't to allow user to modify installation paths on per-component basis.
But if the package includes CMake module GNUInstallDirs and uses variables from it for install components, user may affect on components' installation paths by setting some of these variables. Each such variable has a form
where
<dir>
may be on of (according to the documentation):Note, that the package needn't to use all of these variables. E.g., the package may use variable CMAKE_INSTALL_LIBDIR for install libraries, but ignore CMAKE_INSTALL_INCLUDEDIR when install headers.