[CMake] Confusion regarding usage of find_package and PATHS or HINTS

James Bigler jamesbigler at gmail.com
Tue Jun 10 13:21:43 EDT 2014


That work around seems to only be useful if you wish to modify all the find
modules you wish to use.

Is there a CMake variable you could set that would allow all the
find_{include,library,path} functions within modules to pick up the HINT'ed
path first then search the system paths?


On Tue, Jun 10, 2014 at 11:09 AM, jmerkow <jmerkow at gmail.com> 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
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587615.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140610/3d2bcfaf/attachment.html>


More information about the CMake mailing list