Hi,<br><br><div class="gmail_quote">On Sat, May 19, 2012 at 3:44 PM, Rolf Eike Beer <span dir="ltr"><<a href="mailto:eike@sf-mail.de" target="_blank">eike@sf-mail.de</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> > But to have some useful information: set CMAKE_PREFIX_PATH to the path<br>
> > where the libraries can be found without the lib/ or include/ suffix,<br>
> > CMake will add them itself.<br>
> ><br>
> > So if you have fftw2 in /opt/fftw2/lib/libfftw2.a and fftw3 in<br>
> > /opt/fftw-3/lib/libfftw3.so just call:<br>
> ><br>
> > cmake -D CMAKE_PREFIX_PATH=/opt/fftw2 ...<br>
><br>
</div>> I know that this might be possible. However, I'd like to get CMake to<br>
> read the environment directly, as everything is defined there. This<br>
> will make it easier for other users to compile the code without -D<br>
> CMAKE_PREFIX_PATH=/funny/path-... for several libraries.<br>
<br>
If there is a standard environment variable for a library then just put it<br>
into the Find*.cmake in the HINTS section (again: cmake --help-command<br>
find_library).<br></blockquote><div><br></div><div>Luckily CMAKE_PREFIX_PATH can also be set as environment variable, not just as cmake variable. So if you can teach the module system to set CMAKE_PREFIX_PATH (or the INCLUDE/LIBRARY variants) you should be good to go.</div>
<div><br></div><div>Andreas</div></div>