On 10.06.2014 19:09, jmerkow wrote:
Is there a generally accepted method to pass extra paths to find_package in
module mode? To get around this,  I have been doing something like this:

set(FOO_EXTRA_PATHS path1 path2)
Find_package(FOO)


In FindFOO.cmake:
...
set(FOO_LIB_POSSIBLE_PATHS ${FOO_EXTRA_PATHS} /path3/)
...
(Use the possible paths in find_library/find_file/etc)


Jameson


For additional search paths in which to find modules themselves there is CMAKE_MODULE_PATH but given your example that is I assume not what you are looking for.

There is CMAKE_PREFIX_PATH (environment or cmake cache variable) which is however intended to be used by users of a project so they can tell cmake about their local non standard prefixes rather than by project authors.

Would that fit your use case?

Nils
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to