Skip to content

IMPORTED INTERFACE libraries now behave as normal INTERFACE library / IMPORTED GLOBAL libraries can now be ALIASed.

Deniz Bahadir requested to merge dbahadir/cmake:fix_17197 into master

Changes introduced by this merge-request:

  • The commands target_compile_definitions, target_compile_features, target_compile_options, target_include_directories, target_link_libraries and target_sources can now be used with IMPORTED libraries.
  • ALIASing an IMPORTED library is now possible, too, as long as the aliased IMPORTED target is globally visible (aka was created with option GLOBAL).

Thereby, there is no longer any difference in behavior between normal INTERFACE targets and IMPORTED INTERFACE targets. Only the behavior of IMPORTED INTERFACE targets that are non-GLOBAL differs slightly: they still cannot be aliased.

This merge-request fixes #15689 (closed), #15569 (closed) and #17197 (closed).
Topic-rename: generalize-importedtargets-behavior

Edited by Deniz Bahadir

Merge request reports