MantisBT - CMake
View Issue Details
0013651CMakeCMakepublic2012-11-04 09:302013-04-17 08:54
Gino van den Bergen 
Brad King 
normalmajoralways
closedfixed 
CMake 2.8.10 
CMake 2.8.10.1CMake 2.8.10.1 
0013651: FindSDL.cmake is broken
After adding a Copyright to his name, Mr. Benjamin Eikel (what's in a name) decided to remove a number of path suffixes that plainly broke the FindSDL.cmake to be used in combination with the environment variable SDLDIR. This change was unnecessary as the FindSDL.cmake script works fine for the different platforms. I am puzzled by this action since it simply does not fix anything. I've attached a patch that would fix this for me but clearly the best thing to do would be revert the FindSDL*.cmake scripts back to 2.8.9 before Mr. Benjamin Eikel started his actions.
Set environment variable pointing to your SDL installation, that would typically look like

<SDLDIR>/bin
<SDLDIR>/include/SDL
<SDLDIR>/lib

Try to find the SDL headers and libraries with cmake 2.8.10 and see the latest script fail.
Could someone please take some action against maintainers adding a Copyright notice to the Find scripts, as Mr. Benjamin Eikel did? This behavior is quite obnoxious but also puts users in a difficult position since their rights become unclear. I do not oppose against people getting credited for their contributions but taking a Copyright over a few modified lines of script is simply not helping the product.
No tags attached.
patch FindSDL.patch (602) 2012-11-04 09:30
https://public.kitware.com/Bug/file/4553/FindSDL.patch
Issue History
2012-11-04 09:30Gino van den BergenNew Issue
2012-11-04 09:30Gino van den BergenFile Added: FindSDL.patch
2012-11-05 03:47Benjamin EikelNote Added: 0031420
2012-11-05 10:02Brad KingNote Added: 0031429
2012-11-05 10:02Brad KingAssigned To => Brad King
2012-11-05 10:02Brad KingStatusnew => assigned
2012-11-05 10:04Brad KingNote Added: 0031430
2012-11-05 10:04Brad KingStatusassigned => resolved
2012-11-05 10:04Brad KingResolutionopen => fixed
2012-11-06 15:18David ColeTarget Version => CMake 2.8.10.1
2012-11-07 13:36David ColeFixed in Version => CMake 2.8.10.1
2013-04-17 08:54Robert MaynardNote Added: 0032863
2013-04-17 08:54Robert MaynardStatusresolved => closed

Notes
(0031420)
Benjamin Eikel   
2012-11-05 03:47   
Hello Gino,

thank you for your bug report. I will look into it as soon as possible. I am sorry if the behavior was changed by my commits. This was not my intention.

I assume that you are talking about this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ed24c5316fc4e9b56e3b491dee2f88b2cbb6f17 [^]

I think I misunderstood the find_path and find_library documentation. The suffixes "include" and "lib" are not appended to the paths given in HINT (is that correct?), only to the prefix paths. Therefore, something like the solution given in your patch might be necessary to restore the old behavior.

Kind regards
Benjamin
(0031429)
Brad King   
2012-11-05 10:02   
Re 0013651:0031420: Correct, the find_path and find_library commands add "include" and "lib" only to the prefix paths.

@Gino van den Bergen: Please use a more constructive tone. Benjamin made a good-faith effort to improve CMake with his contributions.

Copyright notices do not affect the rights of users. Rights are granted by the license (3-clase BSD in this case). Furthermore, Benjamin made 20 commits to improve the FindSDL*.cmake modules:

 http://cmake.org/gitweb?p=cmake.git;a=commit;h=7d03885d [^]

His notice of copyright covers the net modifications, which were hardly trivial.
(0031430)
Brad King   
2012-11-05 10:04   
Patch applied with an explanation:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7cb51739 [^]
(0032863)
Robert Maynard   
2013-04-17 08:54   
Closing resolved issues that have not been updated in more than 4 months.