[vtk-developers] Exporting CMake Targets with VTK-6 Dependencies

Cyrus Harrison cyrush at llnl.gov
Wed Oct 23 11:29:42 EDT 2013

Hi Everyone,

I am trying to export target dependencies for a target using VTK-6 into
another CMake project using EXPORT_LIBRARY_DEPENDENCIES, basically:

*Export the target deps for my target lib.
*In a the new build:
    Include the target deps for my lib
    Add the file path w/ VTK libs to "link_directories"
    Build & link without having to include the entire VTK CMake apparatus.

This works in most other CMake contexts -- the problem is, with VTK-6 the
VTK libs have the suffix "-6.0".{so,dylib} and the resulting deps file
(and CMakeCache entries in VTK_LIBRARIES) seems to leave off the "-6.0",
probably due to special CMake rules provided by VTK.
The only exceptions are the built-in third-party libs (such as
libvtkjpeg-6.0) which are fine.

but the generated file in that case appears to have the same issue.

Can anyone point me in the right direction to accomplish this?

(Sorry if this is too far off into CMake land for the VTK-Developers list)

Thanks for any help you can provide,

More information about the vtk-developers mailing list