2012/1/3 Alexander Neundorf <a.neundorf-w...@gmx.net>: >> you basically want: >> set(CMAKE_FIND_ROOT_PATH "/you/local/install/dir") >> before calling find_package(...) > > No, please don't. > CMAKE_FIND_ROOT_PATH is intended for cross-compiling, to tell cmake where the > root of the target file system is located.
Ok my bad. Sorry Alex (twice in fact) for giving wrong advice concerning this. I wasn't aware of the fact that CMAKE_FIND_ROOT_PATH was **reserved** for cross-compiling. > Use CMAKE_PREFIX_PATH instead. It can contain a list of directories, and > find_program(), find_file(), find_path(), find_package() and find_library() > append bin/, include/ and lib/ respectively to each of the directories listed > there. > The directories resulting from CMAKE_PREFIX_PATH are checked before all PATHS > and HINTS directories. > > E.g. if you have stuff inside /your/local/install/dir and /some/other/dir, do > $ export CMAKE_PREFIX_PATH=/your/local/install/dir:/some/other/dir > $ cmake ...args > > or set it directly as a cmake variable within your CMakeLists.txt. > > Alex -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake