[CMake] Find_ macros searching order
David Cole
david.cole at kitware.com
Tue Apr 15 11:28:56 EDT 2008
You can achieve what you want with two find calls. The first is with
NO_DEFAULT_PATH, then if it's not found, the second is without
NO_DEFAULT_PATH.
That way, yours will be found first, but the system version will be found if
yours does not exist.
HTH,
David
On Tue, Apr 15, 2008 at 11:18 AM, Alberto Luaces <aluaces at udc.es> wrote:
> Hi,
>
> is there any way for the FIND_* macros (FIND_PATH, FIND_LIBRARY...) to
> search
> first in the directories specified on the script and after that on common
> system directories?
>
> According to what I have read, it's done in the opposite order, so if I
> have a
> private project branch in my home directory, CMake will always find
> system's
> version instead. If I add NO_DEFAULT_PATH but my private branch doesn't
> exist, CMake won't find any.
>
> Thank you,
>
> Alberto
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080415/55fbf643/attachment.htm>
More information about the CMake
mailing list