Hi,

On Sat, May 19, 2012 at 3:44 PM, Rolf Eike Beer <[email protected]> wrote:
>
> > > But to have some useful information: set CMAKE_PREFIX_PATH to the path
> > > where the libraries can be found without the lib/ or include/ suffix,
> > > CMake will add them itself.
> > >
> > > So if you have fftw2 in /opt/fftw2/lib/libfftw2.a and fftw3 in
> > > /opt/fftw-3/lib/libfftw3.so just call:
> > >
> > > cmake -D CMAKE_PREFIX_PATH=/opt/fftw2 ...
> >
> > I know that this might be possible. However, I'd like to get CMake to
> > read the environment directly, as everything is defined there. This
> > will make it easier for other users to compile the code without -D
> > CMAKE_PREFIX_PATH=/funny/path-... for several libraries.
>
> If there is a standard environment variable for a library then just put it
> into the Find*.cmake in the HINTS section (again: cmake --help-command
> find_library).
>

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.

Andreas
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to