[CMake] Upper or lower case for package variables in FindXXX.cmake files?

Matt Williams lists at milliams.com
Fri Feb 27 13:13:34 EST 2009


Based on the modules readme.txt [1] I have been assuming that if I have a
package called QtOgre (with that capitalisation) then the FindXXX.cmake file
should be called FindQtOgre.cmake (alternatively there should be a
QtOgreConfig.cmake file). In order to maintain unambiguity, I have been
calling the variables within according to the readme.txt rules as things like
QtOgre_LIBRARIES etc. rather that QTOGRE_LIBRARIES.

Looking around at the other FinXXX.cmake files out there (including the
officially distributed ones), there is a mixture of these two casing
conventions. Boost and wxWidgets, for example, both use the mixed case form
but others such as Perl use the uppercased form. Confusingly, there are even
those which mix the two conventions, like FindJasper.cmake containing
JASPER_INCLUDE_DIR.

There is no indication in the readme.txt which is preferred though I have been
assuming the mixed case version. Based on bits and pieces I guess I am right
(for example,the "DOXYGEN_FIND_QUIETLY, but it should have been
Doxygen_FIND_QUIETLY" comment in FindDoxygen.cmake).

Is there an official word on this as the current lack of consistency is
confusing?

Regards,
Matt Williams

[1] http://cmake.org/cgi-
bin/viewcvs.cgi/Modules/readme.txt?root=CMake&view=markup


More information about the CMake mailing list