[CMake] Volunteering to maintain two new Find Modules

Albert Astals Cid aacid at kde.org
Thu Jan 8 14:44:29 EST 2009


A Dijous 08 Gener 2009, Hendrik Sattler va escriure:
> Am Wednesday 07 January 2009 23:54:05 schrieb Albert Astals Cid:
> > Hi, i'm new to the list, so i'm not sure if this is the correct
> > procedure, i read a bit in the wiki and it seems it is, so here i am.
> >
> > I want to add upstream the two attached modules so we don't have to
> > maintain them in poppler. I'll have to maintain them upstream but maybe
> > more people will use them and find bugs/improve.
> >
> > They are pretty simple and work for us in poppler.
>
> Please don't do:
>   find_library(LIBOPENJPEG_LIBRARIES openjpeg)
>
> as it makes it hard to use LIBOPENJPEG_LIBRARIES directly in
> target_link_libraries().
> Instead, use a variable for the cache, say 'openjpeg_LIBRARY' and do
>   find_library(openjpeg_LIBRARY openjpeg)
>   if (openjpeg_LIBRARY)
>     set (LIBOPENJPEG_LIBRARIES $(openjpeg_LIBRARY))
>   endif (openjpeg_LIBRARY)
>
> You also don't need the first-level if-else-endif as find_path and
> find_library will do nothing if the variable is already defined, just don't
> reset the variables.
>
> This makes the modules lik 5 lines which may as well be included directly
> in a project. There is nothing complicated to do. It would be a nightmare
> to have an official module for every library out there.

Isn't it a nightmare that everyone has to write their own, half wrong like 
mine instead of having a centralized one? What's the point of open source if 
you all keep it to yourselves?

Albert

>
> HS
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list