[cmake-developers] Handling of Config specific imported targets?

Stephen Kelly steveire at gmail.com
Thu May 17 09:41:37 EDT 2012


Brad King wrote:

> On 05/16/2012 06:42 AM, Stephen Kelly wrote:
>> In Qt 5 we currently generate IMPORTED_LOCATION_${Config} for the Debug
>> or Release (or both, depending on platform), depending on how Qt is
>> configured.
>> 
>> If both exist (on windows) and the caller uses CMAKE_BUILD_TYPE == Debug
>> or Release, the correct location should be used. However, this doesn't
>> account for having a different or empty CMAKE_BUILD_TYPE.
> 
> We already have some logic to account for a mismatch between the set of
> valid configurations in the exporting v. importing project.  See logic
> here:
> 
>  
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmTarget.cxx;hb=v2.8.8#l4093
> 
> and these properties:
> 
>  
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION_CONFIG
>  
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG
> 

Great, so choosing the correct imported configuration a solved problem. I'll 
point the documentation in of the Qt 5 CMake stuff to that so.

Am I right that it is appropriate to create imported targets without a 
_${Config} though?

Thanks,

Steve.





More information about the cmake-developers mailing list