Dear Feri,
one clean way to do this is to encapsulate all "external-lib dependend stuff"
in a MITK-Module and use this module in your functionality/bundle.
Please have a look at the integration of our image-guided therapy module called
MITK-IGT. You find the hardware-lib dependend stuff and the IGT itself in
./modules/IGT, and you may use these modules like it is done in
mitk\Modules\Bundles\org.mitk.gui.qt.igtexample
So basically, your module's CmakeList.txt may look like this:
..
FIND_PATH(LIB_INCLUDE_DIR xxx.h "Path to the inc directory")
FIND_LIBRARY(LIB_LIBRARY myExtLib.lib ${LIB_INCLUDE_DIR}/lib)
...
MITK_CREATE_MODULE(myModule
INTERNAL_INCLUDE_DIRS "${LIB_INCLUDE_DIR}"
DEPENDS Mitk MitkExt
ADDITIONAL_LIBS "${LIB_LIBRARY}"
)
And you Functionality's / Bundle's CmakeList.txt is enhanced with:
MACRO_CREATE_MITK_PLUGIN(QmitkExt MitkIGT myModule)
Hope this helps.
Regards
Matthias
From: Ferenc Kovács [mailto:[email protected]]
Sent: Friday, February 05, 2010 1:26 PM
To: [email protected]
Subject: [mitk-users] external lib
Dear All,
I am a fresh mitk developer. I have managed to write my own QFunctionality. BUT
:
I have an algorithm wrapped into an external lib (.so or .a).
I would like to use this lib in a QFunctionality.
How can I build MITK with an added external library?
What are the steps?
Which are CMake files needed to be updated?
Thanks,
Feri
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users