Skip to content

install: Do not crash on imported global target

Brad King requested to merge brad.king/cmake:install-no-imported-global into master

Since !2152 (merged) the install(TARGETS) command may find a global-scoped target outside the calling directory. Ignore an IMPORTED GLOBAL target if it is found in this way. Imported targets cannot be installed, and trying to do so violates internal invariants.

Fixes: #19022 (closed)

Merge request reports