[CMake] FindXXX, XXXConfig and UseXXX
Brandon Van Every
bvanevery at gmail.com
Mon Feb 18 14:48:32 EST 2008
On Feb 18, 2008 3:34 PM, Fernando Cacciola <fernando.cacciola at gmail.com> wrote:
>
> XXXConfig.cmake should ...
>
> FindXXX.cmake shoud ...
>
> UseXXX.cmake should set include directories, libraries, compiler and linker
> flags, etc, based on the settings defined in a XXXConfig.cmake that must has
> been processed already.
I've yet to use any of the current UseXXX modules. I looked at the
source for one of them. All they're doing aside from the usual
FindXXX stuff is defining some macros, which you can choose to call or
not call. I don't see a point in breaking all this functionality up
into 3 different include files. 1 is fine; you choose to call
whatever macros you want to call.
> XXX users would load XXX in their own programs via:
>
>
> find_package(XXX)
>
> if ( XXX_FOUND )
>
> include( ${XXX_USE_FILE} )
>
> endif()
What's wrong with:
include(findXXX)
if(XXX_FOUND)
someXXX_macro(whatever)
endif(XXX_FOUND)
Cheers,
Brandon Van Every
More information about the CMake
mailing list