mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
47389c5641
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) 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
4 lines
181 B
CMake
4 lines
181 B
CMake
add_library(imported_global STATIC IMPORTED GLOBAL)
|
|
set_property(TARGET imported_global PROPERTY IMPORTED_LOCATION /does_not_exist)
|
|
install(TARGETS imported_global DESTINATION bin)
|