[CMake] how to select static libraries for linking?

James C. Sutherland James.Sutherland at utah.edu
Thu Jun 11 18:49:39 EDT 2009


I have an executable that links with HDF5 (by the way, is there any  
plan to create a "FindHDF5.cmake" file?).
The problem is that I have two flavors of libraries:
	libhdf5_cpp.a		libhdf5.a
	libhdf5_cpp.dylib	libhdf5.dylib
When I do
   set( HDF5_LIBRARIES hdf5_cpp hdf5 )
it seems that CMake ends up choosing the *.dylib rather than the *.a  
versions.  Is there a way to fix this so that I link statically?



More information about the CMake mailing list