IMP 2.2.0 building (cmake): How to add dependencies in non-standard locations?
Hi,
as usual when it comes to cmake I'm running into troubles, as many of our packages are installed in non-standard locations and I don't seem to be able to configure cmake correctly for those dependencies.
For Boost I succeeded by using
-DBoost_INCLUDE_DIR=/g/software/linux/pack/boost-1.46.0/include -DBoost_LIBRARY_DIRS=/g/software/linux/pack/boost-1.46.0/lib
to `cmake`. But e.g. for HDF5 this doesn't seem to work. I get this in the output of `cmake`:
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) -- Deprecated backends (and hdf5) are disabled
Therefore I tried setting environment the variables $HDF5_LIBRARIES and $DF5_INCLUDE_DIRS to correct values and I also tried with the `cmake` options
-DHDF5_LIBRARIES=/g/software/linux/pack/hdf5-1.8.4/lib -DHDF5_INCLUDE_DIRS=/g/software/linux/pack/hdf5-1.8.4/include
None of the two worked. HDF5 is still not found.
How can I set the correct paths for external libraries? Specifically for HDF5, SWIG and FFTW3? Yes, I tried to find this through Google but didn't find a general solution.
Locally installing the prerequisites is not an option, as this will be a shared installation, used by many workstations.
Thanks in advance Frank
On 07/30/2014 02:08 AM, Frank Thommen wrote: > as usual when it comes to cmake I'm running into troubles, as many of > our packages are installed in non-standard locations and I don't seem to > be able to configure cmake correctly for those dependencies.
The standard way (not IMP specific) to do that in cmake is by setting CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH, as per http://www.cmake.org/Wiki/CMake_Useful_Variables - did you try that?
Ben
On 07/30/2014 08:35 PM, Ben Webb wrote: > On 07/30/2014 02:08 AM, Frank Thommen wrote: >> as usual when it comes to cmake I'm running into troubles, as many of >> our packages are installed in non-standard locations and I don't seem to >> be able to configure cmake correctly for those dependencies. > > The standard way (not IMP specific) to do that in cmake is by setting > CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH, as per > http://www.cmake.org/Wiki/CMake_Useful_Variables - did you try that? > > Ben
Hmm no, but good point. I was somewhat fixated on finding package-specific settings so that I forgot about the generic ones. Will try them tomorrow and let you know if it worked.
frank
On 30.07.14 23:33, Frank Thommen wrote: > On 07/30/2014 08:35 PM, Ben Webb wrote: >> On 07/30/2014 02:08 AM, Frank Thommen wrote: >>> as usual when it comes to cmake I'm running into troubles, as many of >>> our packages are installed in non-standard locations and I don't seem to >>> be able to configure cmake correctly for those dependencies. >> >> The standard way (not IMP specific) to do that in cmake is by setting >> CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH, as per >> http://www.cmake.org/Wiki/CMake_Useful_Variables - did you try that? >> >> Ben > > > Hmm no, but good point. I was somewhat fixated on finding > package-specific settings so that I forgot about the generic ones. Will > try them tomorrow and let you know if it worked.
It seems to work when setting the environment variable CMAKE_PREFIX_PATH=path1:path2, but not with -DCMAKE_PREFIX_PATH=path1:path2 (multiple dependencies in non-standard locations).
However basically the dependencies are now found. Thanks for opening my eyes :-)
frank
participants (2)
-
Ben Webb
-
Frank Thommen