[CMake] FindXXX.cmake...or finding stuff semi-reliably on Windows
Michael Wild
themiwi at gmail.com
Thu Nov 5 03:10:05 EST 2009
On 4. Nov, 2009, at 23:32 , Lucas Thode wrote:
> N00by question: How do you make a FindXXX.cmake file that can find
> XXX even
> semi-reliably on Windows? I wrote a bunch of 'em which work just
> fine on
> Linux, but don't seem to work so well on Windows boxes...
>
> --Lucas
I don't have much experience with Windows either, but what seems to be
a common practice is to dig through the registry (e.g. using
regedit32.exe) and look for registry keys that specify paths that help
you find the thing. You can then use these registry keys as if they
where normal paths, e.g. in your find_path/find_library/find_program
calls or in get_filename_component. I think FindQt4.cmake or
FindPythonLibs.cmake give some good examples on that.
Michael
More information about the CMake
mailing list