Hi, > Let's say my project wants to depend on a library PKG1 (here PKG1 can > be MPFR, MPC, PTHREAD, GMP, BZIP2, you name it). Let's say the library > is installed in $PKG1/include, $PKG1/lib, alternatively, all my > dependencies are installed in $HASHSTACK/include and $HASHSTACK/lib, > or perhaps they are installed system wide.
> Perhaps I am missing the official recommendation regarding the above, > so that's why I am asking here. But if there is none, then I think the > current state is unsatisfactory. you may be looking for CMAKE_PREFIX_PATH (http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_PREFIX_PATH.html) cmake -DCMAKE_PREFIX_PATH=$HOME/built-libs/gmp;$HOME/built-libs/arb;$HOME/built-libs/otherdependencies (or have a script that sets CMAKE_PREFIX_PATH environment variable) works with find_module, find_file, find_library,... expects directories to have standard structure (include,lib,...), see documentation of find_* commands for details. it is usually enough to set CMAKE_PREFIX_PATH to DESTDIRs used in dependencies' "make install DESTDIR=/foo" you may want to remove NO_DEFAULT_PATH as used in linked LibFindMacros.cmake, it disables this functionality. Regards, Oto Petrik -- 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: http://public.kitware.com/mailman/listinfo/cmake