[cmake-developers] EXPORT dependency handling

Stephen Kelly steveire at gmail.com
Wed Jan 20 15:07:03 EST 2016


Roger Leigh wrote:
>    add_library(OME::BioFormats INTERFACE IMPORTED)
>    set_target_properties(OME::BioFormats PROPERTIES
> INTERFACE_LINK_LIBRARIES ome-bioformats)
> 
> It's the last two lines.  Internally, the target name is ome-bioformats,
> but I actually want it to be OME::BioFormats as the name of the imported
> interface.  I don't have any need for "ome-bioformats" to be exported at
> all, but EXPORT only allows a real target.  Unless I missed a
> workaround; I tried exporting ALIAS names and interface names, but
> without success.

You might have missed 

 https://cmake.org/cmake/help/v3.4/prop_tgt/EXPORT_NAME.html

Thanks,

Steve




More information about the cmake-developers mailing list