1CMP0022 2------- 3 4:prop_tgt:`INTERFACE_LINK_LIBRARIES` defines the link interface. 5 6CMake 2.8.11 constructed the 'link interface' of a target from 7properties matching ``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?``. 8The modern way to specify config-sensitive content is to use generator 9expressions and the ``IMPORTED_`` prefix makes uniform processing of the 10link interface with generator expressions impossible. The 11:prop_tgt:`INTERFACE_LINK_LIBRARIES` target property was introduced as a 12replacement in CMake 2.8.12. This new property is named consistently 13with the ``INTERFACE_COMPILE_DEFINITIONS``, ``INTERFACE_INCLUDE_DIRECTORIES`` 14and ``INTERFACE_COMPILE_OPTIONS`` properties. For in-build targets, CMake 15will use the INTERFACE_LINK_LIBRARIES property as the source of the 16link interface only if policy ``CMP0022`` is ``NEW``. When exporting a target 17which has this policy set to ``NEW``, only the :prop_tgt:`INTERFACE_LINK_LIBRARIES` 18property will be processed and generated for the ``IMPORTED`` target by 19default. A new option to the :command:`install(EXPORT)` and export commands 20allows export of the old-style properties for compatibility with 21downstream users of CMake versions older than 2.8.12. The 22:command:`target_link_libraries` command will no longer populate the properties 23matching ``LINK_INTERFACE_LIBRARIES(_<CONFIG>)?`` if this policy is ``NEW``. 24 25Warning-free future-compatible code which works with CMake 2.8.7 onwards 26can be written by using the ``LINK_PRIVATE`` and ``LINK_PUBLIC`` keywords 27of :command:`target_link_libraries`. 28 29The ``OLD`` behavior for this policy is to ignore the 30:prop_tgt:`INTERFACE_LINK_LIBRARIES` property for in-build targets. 31The ``NEW`` behavior for this policy is to use the ``INTERFACE_LINK_LIBRARIES`` 32property for in-build targets, and ignore the old properties matching 33``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?``. 34 35This policy was introduced in CMake version 2.8.12. CMake version 36|release| warns when the policy is not set and uses ``OLD`` behavior. Use 37the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. 38 39.. include:: DEPRECATED.txt 40