[cmake-developers] CMake Find modules out of the CMake tree

Brad King brad.king at kitware.com
Wed Sep 30 10:22:47 EDT 2015


On 09/30/2015 02:34 AM, Tuukka Pasanen wrote:
> I've been using successfully CMake for years and one can find almost 
> Find-functions for everything (SDL2 for example) from dark corners net 
> but then comes the question. Is there any project that tracks down these 
> out of tree modules and makes them easily install because now I have to 
> keep them in tree and find 'best' version of script (because there is 
> several in-tree version available). So do anyone know is there 
> coordinated effort to do this kind of 'Incubator' modules repository?

I'm not aware of a project with that specific purpose off the top of
my head.  The closest project may be KDE's extra-cmake-modules:

 https://community.kde.org/Frameworks/Building/Details#Extra_CMake_Modules
 http://api.kde.org/ecm/manual/ecm.7.html

With regard to SDL2, the proper way to make it find-able with CMake is
for SDL2 to provide a CMake packaging files themselves as part of their
own distribution (since they build with CMake):

 https://cmake.org/cmake/help/v3.3/manual/cmake-packages.7.html

This is why upstream CMake does not have a find module for SDL2.
We cannot possibly maintain a find module with deep awareness of
libraries/versions/etc. for every project out there.

-Brad



More information about the cmake-developers mailing list