[CMake] find_package(), sources only

Hendrik Sattler post at hendrik-sattler.de
Mon Nov 7 06:28:32 EST 2011


Am 07.11.2011 12:04, schrieb Daniel Dekkers:
> Just a thought.

Just a thought on your thought.

> We are incorporating 3rd party library Bullet in our own library. 
> This can
> be done on two levels (via an option). Either by sources (which is 
> standard
> practice with Bullet), or by linking to the built Bullet libraries 
> directly.
> Now find_package(BULLET) (i.e. the findBullet.cmake script) sets
> BULLET_FOUND to true only if the include directory *and* the 
> libraries are
> found. But if we only use the sources, we don't need the libs and we 
> ignore
> the BULLET_FOUND "error" if they don't exist but still use the path 
> to the
> include directories.
>
> Wouldn't it be good if you could extend find_package() with some kind 
> of
> "SOURCE-ONLY" communication or do you think that is the 
> responsibility of
> the find<package>.cmake writer?

If you are using the sources as internal copy of that library, don't 
you also have the include files as internal copy? In this case, it would 
be wrong to use the external headers as they might not match your source 
copy.

HS



More information about the CMake mailing list