Hi Matt,

when you call the MACRO_CREATE_MITK_CTK_PLUGIN() in your plug-in's 
CMakeLists.txt file, the value of ${PROJECT_NAME} will be used as the 
target name. You can use this variable to link your plug-in to other 
libs outside the CTK/MITK build-system (yes, this should be documented 
somewhere...).

For example,

#-------------------------------------------------------------------
PROJECT(org_my_plugin)

FIND_PACKAGE(ThirdPartyLib REQUIRED)
INCLUDE_DIRECTORIES(${ThirdPartyLib_INCLUDE_DIRS})

MACRO_CREATE_MITK_CTK_PLUGIN(...)

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ThirdPartyLib_LIBRARIES})
#-------------------------------------------------------------------

The only downside is that the include dirs are not inherited, meaning 
that if the above plug-in includes header files from ThirdPartyLib in 
its "public API headers" and if there is a dependency of another plug-in 
to it, this plug-in needs to have the ${ThirdPartyLib_INCLUDE_DIRS} dirs 
set manually. If you need this kind of build system feature, you could 
look into the MITK/CMake/PackageDepends folder, which provides "fake 
MITK module configs" for external libs.

Best,
Sascha

On 07/22/2011 10:02 AM, Clarkson, Matt wrote:
> Hi there,
>
> hopefully a quick question. I have integrated the MITK template project into 
> my project as we already have a fair bit of ITK and VTK stuff, and command 
> line programs and the like.
>
> So, now within the MITK bit, I have created Modules and Plugins no problem.
> However, I have a new plugin, so how do I link to a library that is not 
> declared as an MITK module.  Or in other words, how do I link to a library, 
> built somewhere else in the rest of the project that MITK knows nothing about?
>
> Or do I have to use MITK to create all my libraries?
>
> Thanks
>
> Matt
>
>
> ------------------------------------------------------------------------------
> 10 Tips for Better Web Security
> Learn 10 ways to better secure your business today. Topics covered include:
> Web security, SSL, hacker attacks&  Denial of Service (DoS), private keys,
> security Microsoft Exchange, secure Instant Messaging, and much more.
> http://www.accelacomm.com/jaw/sfnl/114/51426210/
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to