Hi, I'd like to comment on the Find*.cmake variable naming procedure adopted by cmake. Right now I have to look at some Find*.cmake files to see what are the output variables they create. Some packages create a *_LIBRARY, others *_LIBRARIES, others *_INCLUDE_DIRS and others *_INCLUDE_DIR. The Modules/readme.txt procedure isn't being used for some packages.

Also the vast majority creates upcased (is this an adjective?) variable names, BUT Boost and wxWidgets. There two define Boost_FOUND, Boost_LIBRARIES, wxWidgets_FOUND, wxWidgets_LIBRARIES. It should be better if they were BOOST_FOUND, WXWIDGETS_FOUND etc.

This gets annoying when you're trying to create a macro that accepts a package name, finds it and use their output variables. This requires an uniformity that is lacking on Find*.cmake's.

I'll try to summarize below the discrepancies I've found (just a few of them)

Aspell: outputs ASPELL_INCLUDE_DIR instead of ASPELL_INCLUDE_DIRS
AVIFile: outputs AVIFILE_INCLUDE_DIR instead of AVIFILE_INCLUDE_DIRS
Boost: variable names should be upcase.
Bzip2: outputs BZIP2_INCLUDE_DIR instead of BZIP2_INCLUDE_DIRS
Cable: outputs CABLE_TCL_LIBRARY instead of CABLE_TCL_LIBRARIES, and            
       CABLE_INCLUDE_DIR instead of CABLE_INCLUDE_DIRS
Cups: outputs CUPS_INCLUDE_DIR instead of CUPS_INCLUDE_DIRS
Curses: outputs CURSES_INCLUDE_DIR instead of CUPS_INCLUDE_DIRS
DCMTK: outputs DCMTK_INCLUDE_DIR instead of DCMTK_INCLUDE_DIRS

...

and there's a lot more. It seems that the majority uses *_INCLUDE_DIR instead of *_INCLUDE_DIRS

Regards,
rod

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to