On 21/01/2015 16:59, Sascha Zelzer wrote:
> Hi Johannes,
> 
> the target might not exist after mitk_create_module() if the 
> dependencies for that module could not be resolved. 

Ahah! That was it, missing dependency. Nothing appeared in the log
though. I noticed that there still was MitkExt on the DEPENDS list
(which was deprecated previously?). Removing that makes configure work.

Thanks for the pointer!

> Depending on your 
> CMake set-up, the target name could have a prefix as well. In general, 
> you should use code like this after a mitk_create_module() call:
> 
> if(TARGET ${MODULE_TARGET})
>    # do things with ${MODULE_TARGET})
> endif()
> 
> Best,
> Sascha
> 
> On 01/21/2015 04:18 PM, Johannes Totz wrote:
>> Hi there,
>>
>> I'm currently trying to upgrade some of our code to a new(er) MITK
>> version. Problem I'm facing is this:
>>
>>> CMake Error at Code/Gui/MITK/Modules/niftkIGIGui/CMakeLists.txt:36 
>>> (set_target_properties):
>>>    set_target_properties Can not find target to add properties to: 
>>> niftkIGIGui
>> For a snippet that looks like:
>>
>>> MITK_CREATE_MODULE(niftkIGIGui
>>>    EXPORT_DEFINE NIFTKIGIGUI_EXPORT
>>>    INCLUDE_DIRS ...stuff...
>>>    DEPENDS ...stuff...
>>>    PACKAGE_DEPENDS ...stuff...
>>> )
>>>
>>> if(MSVC)
>>>    if(OPENMP_FOUND)
>>>      set_target_properties(${MODULE_TARGET} PROPERTIES COMPILE_FLAGS 
>>> ${OpenMP_CXX_FLAGS})
>>>    endif()
>>> endif()
>> This happens only for two modules in the source, the others are fine.
>> I have been banging my head against the wall for some time now but can't
>> make heads or tails of this.
>> Any idea why the target would not exist after MITK_CREATE_MODULE?
>>
>> I've tried this with cmake 3.02 and 3.1, on Windows with VS2012.
>>
>>
>> Thanks,
>>
>> Johannes
>>



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to