[CMake] Reading registry broken on Windows 7?

Brad King brad.king at kitware.com
Thu Nov 19 10:41:57 EST 2009


Bill Hoffman wrote:
> You want:
> 
>  get_filename_component(MYPATH 
> "[HKEY_LOCAL_MACHINE\\SOFTWARE\\7-Zip;Path]" PATH)

The PATH option will strip off the last component of the path after lookup.
Use ABSOLUTE instead:

   get_filename_component(MYPATH
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\7-Zip;Path]"
     ABSOLUTE)

-Brad


More information about the CMake mailing list