SCI Seg3D Mailing List

Text archives Help


[Seg3D] Re: Re: adding an external library to Seg3D


Chronological Thread 
  • From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
  • To: seg3d@sci.utah.edu
  • Subject: [Seg3D] Re: Re: adding an external library to Seg3D
  • Date: Fri, 16 Oct 2009 22:26:40 +0100

Kristen Zygmunt wrote:

I'll give you some suggestions for using CMake, since your situation is a little different from the standard library used by Seg3D since CMake will not actually be building the library. This will make things easier, but you won't be able to exactly follow existing Seg3D/SCIRun examples. Also, my command suggestions below are


Hi Kristen,

Thanks your reply.

Then in SCIRun/src/Applications/Seg3D/CMakeLists.txt, add a statement
 like TARGET_LINK_LIBRARIES(Seg3D ${QWT_LIBRARY})

I think this can also be done by adding ${QWT_LIBRARY}
to SET(Seg3D_LIBS...) in the file you mention.


I was a bit unsatisfied with having to hack this, so I started
reading about CMake, and I gave it a try to get the library integrated.

And it seems to work with the code I've written. Running cmake and make builds the library libqwt.a (a static version, to follow the same idea as the other external libraries), links it to QT, and then it is linked into Seg3D.

The full patch for Revision: 44506 is the following (I don't attach it
because it's 1.7M)

http://www.paracommunications.org/wiki/codefiles/22091016-220200-add-external-qwt-library.diff

The patch can be applied from the root directory SCIRun running

 $ patch -p0 -i ./22091016-220200-add-external-qwt-library.diff

linked from

http://paracommunications.org/wiki/index.php?title=Adding_a_new_filter_to_Seg3D&action=edit&section=22


The bit I'm not so sure about is that I'm linking the QT library to
libqwt.a using this code in SCIRun/src/Externals/qwt-5.2/src/CMakeLists.txt

<CODE>
SET(CORELIBS ${QT_LIBRARY})
ADD_LIBRARY(qwt ${qwt_SRCS})
TARGET_LINK_LIBRARIES(qwt ${CORELIBS})
</CODE>

Regardless of whether I comment out the TARGET_LINK_LIBRARIES line to link to QT or not, the resulting binary Seg3D has the same size (20M).

So are the new libraries correctly linked? I don't know. I suppose I'll
find out when I start using the functions in Qwt. I'll report back.


As an additional note, I just wanted to let you know I've been
following your progress and greatly appreciate your comments /
suggestions / documentation.

On the contrary, thank you, and the other guys for your patience and help.

Cheers,

Ramon.

--
Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/



Archive powered by MHonArc 2.6.16.

Top of page