Missing imported target

By default, imported targets do not have a global scope. To solve your problem, add keyword GLOBAL:

add_library(my_import_target SHARED IMPORTED GLOBAL)
1 Like