[cmake-developers] Kind-of standard way to support also in-project find-modules

Pau Garcia i Quiles pgquiles at elpauer.org
Tue Jan 11 18:24:12 EST 2011


On Wed, Jan 12, 2011 at 12:18 AM, Brad King <brad.king at kitware.com> wrote:
> 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.

Oh, OK. I thought this was for the case you want to distribute the
third-party binaries you use to develop your application (we do that
internally).

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the cmake-developers mailing list