[CMake] Find* Modules and unusual package location

Philip Lowman philip at yhbt.com
Mon Mar 2 23:46:46 EST 2009


On Mon, Mar 2, 2009 at 9:59 AM, Adolfo Rodríguez <dofo79 at gmail.com> wrote:

> Hi all,
>
> After reading the recently added wiki doc<http://www.cmake.org/Wiki/CMake:Improving_Find*_Modules>about improving CMake Find* modules, I have a style question. In the section
> that discusses finding packages in unusual locations, it is suggested that
> "Each module should have an environment variable that is looked at first...
> Once the module finds the package based on the environment variable, a CMake
> cache variable of the same name should be created". Is there a naming
> convention for this environment variable?. I was thinking that
> <PackageName>_ROOT would be a good idea, since it would go along nicely with
> existing CMake variables such as BOOST_ROOT.
>
> I'm currently overhauling a bunch of custom-made Find* packages, and would
> like to adhere as much as possible to the existing naming conventions.


There is a <PackageName>_ROOT_DIR in the official readme.txt although usage
is somewhat split, many modules use <PackageName>_ROOT including CMake
itself.

See the Modules/readme.txt file for other variables:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMake&view=markup

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090302/cc53b42d/attachment.htm>


More information about the CMake mailing list