View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000834CMakepublic2004-05-11 23:302004-05-17 15:40
ReporterMathieu Malaterre 
Assigned ToBill Hoffman 
PrioritylowSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000834: SWIG_LINK_LIBRARIES and linking to library
DescriptionI have a project gdcm where I generate ligdcm.so and I want to generate _gdcm.so (swig wrapping).

Thus I end up with:
ADD_LIBRARY(gdcm foobar.cxx)
SWIG_LINK_LIBRARIES(gdcm gdcm ${PYTHON_LIBRARIES})

And cmake get confused (first gdcm refer to _gdcm and second refer to libgdcm)

Therefore to work around I did:
SWIG_LINK_LIBRARIES(gdcm ${PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(_gdcm gdcm)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0001065)
Bill Hoffman (manager)
2004-05-17 15:40

I tried this in CMake/Tests/SwigTest/CMakeLists.txt:


ADD_LIBRARY(example example.cxx)
SWIG_ADD_MODULE(example "${language}"
  example.i )
SWIG_LINK_LIBRARIES(example example ${SWIG_LANG_LIBRARIES})

So there is a library called example and a python module called _example, and it works fine. I tried with cygwin and windows.

-Bill

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team