[vtkusers] CMAKE_EXE_LINKER_FLAGS question

Leila Baghdadi baghdadi at sickkids.ca
Thu Mar 4 15:23:41 EST 2004


Theodore,

I just went through a couple of days of struggling to add a similar thing 
to my vtk build but not with CMAKE_EXE_LINKER_FLAGS.

you must add the following to your CMakeLists.txt (I have changed mine at 
../VTK/Examples/Build/vtkLocal as this is where I am adding my own 
classes)
 
# added this to link against hdf5 
  FIND_PATH (HDF5_INCLUDE_PATH hdf5.h 
	    /usr/include
	    /home/../include)

  INCLUDE_DIRECTORIES(${HDF5_INCLUDE_PATH})
  
  FIND_LIBRARY(HDF5_LIBRARY hdf5 
			    /usr/lib 
			    /home/../lib)


and also where you have the list of kits

# List the kits from VTK that are needed by this project.
SET(vtkLocal_LIBS
  vtkCommon
  vtkImaging
  vtkIO
  ${HDF5_LIBRARY}
)

and most important, if you have been playing with these flags and have a 
corrupted CMakeCache.txt you must manually remove it and rerun ccmake to 
create a new one as I was under the impression that make clean does that 
and got really weird looking errors.


HTH


Leila

On Thu, 4 Mar 2004, Theodore D. Sternberg wrote:

> I want to put a little extra something ;-) on my link line.  So isn't
> CMAKE_EXE_LINKER_FLAGS the thing that I need to set?  Unfortunately, it 
> doesn't seem to have any effect.  I say
> 
> cmake ../src -DCMAKE_CXX_FLAGS:STRING=' -L../lib -lhdf5 ' -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
> 
> (and a few more things on the cmake command line but they aren't relevant 
> here)
> 
> and still I don't see anything like -L../lib and -lhdf5 on my link line.
> 
> I'm developing on Linux with gcc3.3.2, by the way.
> 
> Theodore Sternberg
> Lawrence Berkeley National Laboratory
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 

-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
        -- Henry Spencer





More information about the vtkusers mailing list