Invalid <Target>-NOTFOUND dependency in Makefile for IMPORTED targets without IMPORTED_LOCATION
Minimal example:
cmake_minimum_required(VERSION 3.13)
add_library(Broken::lib SHARED IMPORTED)
# Do not do set_target_properties(Broken::lib PROPERTIES IMPORTED_LOCATION ...)
add_executable(mytarget main.cpp)
target_link_libraries(mytarget Broken::lib)
CMake runs through without errors, but the Makefile is broken:
[florian@florian-desktop build]$ LC_ALL=C make
CMakeFiles/mytarget.dir/build.make:82: *** target pattern contains no '%'. Stop.
make[1]: *** [CMakeFiles/Makefile2:72: CMakeFiles/mytarget.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
because of this line in CMakeFiles/mytarget.dir/build.make:82
mytarget: Broken::lib-NOTFOUND
I'd expect CMake to fail with an error here and not generate invalid Makefiles.
Tested with current master (94be5f93)