[CMake] How to read content of a registry entry on WIN32?

David Cole david.cole at kitware.com
Wed May 7 11:45:03 EDT 2008


It looks like you are missing a ";" before InstallPath. The ";" delimits the
key name and the value name in this syntax...


On Wed, May 7, 2008 at 11:42 AM, Alan W. Irwin <irwin at beluga.phys.uvic.ca>
wrote:

> On 2008-05-07 15:37+0200 Eric Noulard wrote:
>
>  I want to use the content of a regsitry entry
> >
> > HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32/InstallPath
> >
> > in order to use it in a FIND_PROGRAM , PATHS argument?
> >
> > find_program(LEX_PROGRAM
> >                    NAMES flex lex
> >                    PATHS
> > "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\InstallPath]/bin"
> >                    NO_DEFAULT_PATH
> >                    DOC "A lex-compatible lexer generator")
> >
> > but this does not work?
> >
> > How can I do that?
> >
>
> There are a lot of examples of using HKEY_LOCAL_MACHINE in the CMake
> modules.  From studying those (without any knowledge of the windows
> registry) I cannot see what is wrong with the above, but maybe you will
> have
> better luck spotting the problem given all the (presumably) working
> examples.
>
> Alan
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state implementation
> for stellar interiors (freeeos.sf.net); PLplot scientific plotting
> software
> package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
> Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080507/bae547ad/attachment.htm>


More information about the CMake mailing list