Hi Simon,

please also read the thread "Communication between plugins", it might be 
of interest to you.

You can easily create a shared library with the following CMake code:

FIND_PACKAGE(MITK REQUIRED)

MITK_CREATE_MODULE(yourModuleName
   INCLUDE_DIRS ...
   DEPENDS MitkExt ...
)

You have to list the source files of your module in a file called 
files.cmake. Just look at any module in MITK for examples. Also see the 
the file <mitk-source/CMake/CoreHelpers.cmake (~ line 180) for 
documentation of the macro.

This will automatically set-up all paths for you. The only downside is 
that the macros will create files in your original MITK build-tree, in 
the modulesConf directory.

In other modules, just add the module name to the DEPENDS argument. In 
plugins, add the module name as an argument to the 
MACRO_CREATE_MITK_PLUGIN call in the CMakeLists.txt file.


The other approach is to just use plugins which will reference each 
other by writing

Require-Bundle: <symbolic-name>, <symbolic-name>, ...

in their META-INF/MANIFEST.MF file. This will also set-up include and 
linker directives automatically. This approach will not touch your MITK 
build-tree.

Best,
Sascha

On 12/03/2010 07:49 PM, Simon Eck wrote:
> Dear list,
>
> i wonder if there is a conveniant way of sharing common functionality
> which has dependencies to MITK between different MITK applications /
> plugins.
>
> I tried to setup an CMake project creating a shared library for that
> reason. However, manually adding all ITK, VTK, Qt and MITK headers and
> setting up the linker seems not to be feasible, especially regarding
> future changes in one of the toolkits.
>
> Is there a more comfortable way to achieve a common code base which may
> be accessed by several plugins?
>
> Best regards,
> Simon
>
>
> -----------------------------------------------------------------
> Simon Eck
> Dipl. Ing. (FH) Technische Informatik
>
> DKFZ Heidelberg and University of Heidelberg, BIOQUANT, IPMB
> Div. Theoretical Bioinformatics, Biomedical Computer Vision Group
>
> BioQuant Center, BQ 20
> Im Neuenheimer Feld 267 (3rd floor, room 362)
> 69120 Heidelberg, Germany
>
> office: +49-(0)6221-54-51307
> mobile: +49-(0)176-21050561
> email:  simon.eck :at: bioquant.uni-heidelberg.de
> web:    http://www.bioquant.uni-heidelberg.de/bmcv
>
>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> Tap into the largest installed PC base&  get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>    


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to