[CMake] OpenSceneGraph Find Modules
Alexander Neundorf
a.neundorf-work at gmx.net
Sat Jan 5 05:21:59 EST 2008
On Friday 04 January 2008, Hendrik Sattler wrote:
...
> > Then I have a FindZeroCIce.cmake which essentially has this code:
> >
> > [...]
> > SET( ZeroCIceCore_FIND_QUIETLY TRUE )
> > SET( ZeroCIceBox_FIND_QUIETLY TRUE )
> > SET( ZeroCIceGrid_FIND_QUIETLY TRUE )
> > SET( ZeroCIcePatch2_FIND_QUIETLY TRUE )
> > SET( ZeroCIceSSL_FIND_QUIETLY TRUE )
> > SET( ZeroCIceStorm_FIND_QUIETLY TRUE )
> > SET( ZeroCIceUtil_FIND_QUIETLY TRUE )
> > SET( ZeroCIceXML_FIND_QUIETLY TRUE )
> > SET( ZeroCIceExecutables_FIND_QUIETLY TRUE )
> > SET( ZeroCIceFreeze_FIND_QUIETLY TRUE )
> > SET( ZeroCIceGlacier2_FIND_QUIETLY TRUE )
> >
> > FIND_PACKAGE( ZeroCIceCore )
>
> or simpler:
> foreach ( i Core Box Grid Patch2....)
> set ( ZeroCIce${i}_FIND_QUIETLY TRUE )
> find_package ( ZeroCIce${i} )
> endforeach ( i )
> That's not really worth a seperate module file.
>
> Maybe a scheme for module subdirectories should be created and added to
> CMake? There are probably plenty of such projects that are splitted into
> numerous sub-parts. A
> find_package ( ZeroCIce COMPONENTS Core Box )
> could then automatically resolv to the above two parts but for the module
> files:
> FindZeroCIce/Core.cmake and
> FindZeroCIce/Box.cmake
>
> If that cannot be included into CMake, such modules could include the files
> in the subdir and evaluate the COMPONENTS themselves in a
> FindZeroCIce.cmake. IMHO using a subdirectory is way better than putting
> everything in the file name because at one point, the directory listing of
> the modules directory will not be readable anymore :-(
Yes.
Can you please open a feature request in the bug tracker for that ?
Alex
More information about the CMake
mailing list