View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000896CMakepublic2004-05-30 23:072004-06-01 08:21
ReporterMathieu Malaterre 
Assigned ToSystem Admin 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000896: TARGET_LINK_LIBRARIES + UseSWIG
DescriptionUsing :

SWIG_ADD_MODULE(gdcm python gdcm.i )
SWIG_LINK_LIBRARIES(gdcm gdcm ${PYTHON_LIBRARIES})
GET_TARGET_PROPERTY(gdcm_fullpath "${SWIG_MODULE_gdcm_REAL_NAME}" LOCATION)
TARGET_LINK_LIBRARIES (MyOtherLib ${gdcm_fullpath})

This produces a library "_gdcm.so". But since this is a shared lib, cmake insist on trying to link it with: -l_gdcm .

Could we add a new MACRO to link to the library created with SWIG_ADD_MODULE.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0001149)
System Admin (reporter)
2004-06-01 08:21

You cannot portably link libraries with _ in prefix. The right approach is:

ADD_LIBRARY(mygdcm ...)
SWIG_LINK_LIBRARIES(gdcm mygdcm)
TARGET_LINK_LIBRARIES(MyOtherLib mygdcm)

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team