[CMake] New Module: FindSDL_gfx.cmake

David Cole david.cole at kitware.com
Thu Jul 7 09:59:52 EDT 2011


On Thu, Jul 7, 2011 at 8:05 AM, Michael Hertling <mhertling at online.de>wrote:

> On 07/07/2011 12:23 AM, David Cole wrote:
> > Many people care. Few have time to respond to everything on the CMake
> > mailing list...
> >
> > This is how to become a CMake module maintainer if it is necessary:
> > http://www.cmake.org/Wiki/CMake:Module_Maintainers
> >
> > Looks like Eric Wing is the maintainer for the other SDL related find
> > modules. I'll forward this to him to see what he says...
> >
> >
> > Cheers,
> > David
> >
> >
> > On Wed, Jul 6, 2011 at 6:16 PM, David Demelier <demelier.david at gmail.com
> >wrote:
> >
> >> On 29/06/2011 21:49, David Demelier wrote:
> >>
> >>> Hello cmake users,
> >>>
> >>> I don't know how users usually send new modules so I try by mail. I
> made
> >>> a cmake module for SDL_gfx library
> >>> (http://www.ferzkopp.net/**Software/SDL_gfx-2.0/<
> http://www.ferzkopp.net/Software/SDL_gfx-2.0/>
> >>> )
> >>>
> >>> It's not a SDL official library but it is popular and a lot of games
> are
> >>> using it.
> >>>
> >>> The FindSDL_gfx.cmake module found as attachment is inspired by
> >>> FindSDL_mixer.cmake because they are very similar.
> >>>
> >>> Cheers,
> >>>
> >>>
> >> Nobody cares :(
> >>
> >> --
> >> David Demelier
>
> Just a few remarks on my part:
>

Thanks, Michael.



>
> (1) FindSDL_gfx.cmake does not handle the QUIET and particularly the
> REQUIRED flag, e.g. by FIND_PACKAGE_HANDLE_STANDARD_ARGS(). The other
> SDL-related find modules including FindSDL.cmake itself do not either.
>
> (2) FindSDL_gfx.cmake does not adhere to the recommendations in
> ${CMAKE_ROOT}/Modules/readme.txt w.r.t. the result variables, i.e.
> there's no non-cached variable ending in *_LIBRARIES containing the
> package's library including its prerequisites. The other SDL-related
> find modules including FindSDL.cmake itself do not either. The latter
> (mis)uses the cached SDL_LIBRARY variable to contain prerequisites for
> the actual SDL library and command line switches for the linker, and
> FindSDL_sound.cmake - providing an SDL_SOUND_LIBRARIES variable -
> puts this variable in the cache where it does not belong.
>
>
(1) and (2) are both filled with excellent points.



> (3) Instead of adding the nth FindSDL_xyz.cmake module, wouldn't it be
> preferable to invest the time, work and brain in the development of a
> nice single, standard-compliant and multi-component-aware find module
> for SDL and friends with components, say, core/main/mixer/gfx etc.?
>
>
Indeed, it would be preferable. Actually, I would prefer it if all of the
Find modules were installed as part of the project that they represent
rather than being in CMake itself. If a project has a standard/conventional
default installation location, CMake's find_package is perfectly content to
pull the find module from the project's own install tree. These things
really belong distributed out in the projects they represent, not in CMake
itself.

Thanks for your continued effort on the CMake mailing list, Michael. Your
depth of CMake knowledge is mucho appreciated.


David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110707/27badd96/attachment.htm>


More information about the CMake mailing list