[CMake] Volunteering to maintain two new Find Modules

Alexander Neundorf a.neundorf-work at gmx.net
Thu Jan 8 17:45:51 EST 2009


On Thursday 08 January 2009, Albert Astals Cid wrote:
> A Dijous 08 Gener 2009, Alexander Neundorf va escriure:
...
> > And are you sure you want to name it "FindLIBOPENJPEG.cmake" and not
> > maybe "FindLibOpenJPEG.cmake" ? That's the capitalization they use on
> > their webpage.
>
> Ok, so at the end it is
>
> find_path(LibOpenJPEG_INCLUDE_DIR openjpeg.h
>           PATH_SUFFIXES openjpeg openjpeg-1.0)
>
> find_library(LibOpenJPEG_OPENJPEG_LIBRARY openjpeg)
>
> if (LibOpenJPEG_OPENJPEG_LIBRARY)
>   set (LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY})
> endif (LibOpenJPEG_OPENJPEG_LIBRARY)
>
> include(FindPackageHandleStandardArgs)
> find_package_handle_standard_args(LIBOPENJPEG DEFAULT_MSG
> LibOpenJPEG_LIBRARIES LibOpenJPEG_INCLUDE_DIR)
>
> set(LibOpenJPEG_INCLUDE_DIRS ${LibOpenJPEG_INCLUDE_DIR})
>

Almost :-)
As prefix for variables always use the upper case package name, i.e. 
LIBOPENJPEG here. Just the first argument for 
find_package_handle_standard_args() should be the name of the package itself, 
which should usually exactly match the filename (including casing).

> But this noise in the list isn't worth if we don't get a proper ok/ko from
> the package maintainers regarding the fact of having this kind of FindFoo
> files in cmake upstream or not.

I think in most cases it is accepted, so it's ok. 

Alex


More information about the CMake mailing list