[CMake] failure to build Cmake to / against non-standard directory under Linux
Chuck Atkins
chuck.atkins at kitware.com
Fri Mar 16 12:56:06 EDT 2018
CMAKE_PREFIX_PATH just adds a set of search paths. To instead have it
shift it's entire search infrastructure, you can use the
CMAKE_FIND_ROOT_PATH CMake variable and a few associated with it, which
will cause the entire set of search heuristics to be re-rooted in the
specified path. First run the bootstrap step:
mkdir build
cd build
../bootstrap
Then use the bootstrapped CMake with the find root path settings:
./Bootstrap.mk/cmake \
-DCMAKE_FIND_ROOT_PATH=/home/tools \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY \
-DCMAKE_USE_SYSTEM_LIBRARIES=ON \
-DCMAKE_INSTALL_PREFIX=/home/tools \
..
make -j8
make install
- Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180316/87814ef9/attachment.html>
More information about the CMake
mailing list