[cmake-developers] Kind-of standard way to support also in-project find-modules
Brad King
brad.king at kitware.com
Tue Jan 11 18:18:07 EST 2011
On 01/11/2011 06:13 PM, Pau Garcia i Quiles wrote:
> What about something like this?
>
> if( FOO_USE_LOCAL_BAR)
> set( CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR}/3rdparty )
> endif(FOO_USE_LOCAL_BAR)
>
> find_package(BAR)
>
> It searches the local directory first, then goes for system. Looks easier to me.
The FindBAR.cmake module is looking for a binary installation of BAR,
as in "lib/libbar.a" or "bin/bar". The source tree does not provide
this so is not an appropriate place to look.
-Brad
More information about the cmake-developers
mailing list