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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to