[CMake] Transitive link question

Biddiscombe, John A. biddisco at cscs.ch
Tue Dec 13 10:59:17 EST 2011


Project A creates a target which links to hdf5 using the hdf5 cmake generated cmake file which lists the imported location for the debug lib as hdf5d.lib



SET_TARGET_PROPERTIES(hdf5 PROPERTIES

  IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"

  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "kernel32;ws2_32;wsock32;C:/Program Files/MPICH2/lib/mpi.lib;C:/Program Files/MPICH2/lib/fmpich2.lib"

  IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/hdf5d.lib"

  )



when project A creates its own install file it generates the target properties as follows - using the name hdf5 - not hdf5d.lib



SET_TARGET_PROPERTIES(A PROPERTIES

  IMPORTED_IMPLIB_DEBUG "D:/cmakebuild/test/bin/Debug/A.lib"

  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "C:/Program Files/MPICH2/lib/mpi.lib;hdf5; "

  IMPORTED_LOCATION_DEBUG "D:/cmakebuild/test/bin/Debug/A.dll"

  )



and when project B loads the cmake file for project A, it does not pick up the correct lib name for the hdf5 library.



Is there a way to get this right?



thanks



JB



--

John Biddiscombe,                            email:biddisco @ cscs.ch

http://www.cscs.ch/

CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07

Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111213/24b8cbce/attachment.htm>


More information about the CMake mailing list