[CMake] New Module: FindSDL_gfx.cmake

Michael Hertling mhertling at online.de
Thu Jul 7 08:05:16 EDT 2011


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:

(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.

(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.?

Regards,

Michael


More information about the CMake mailing list