Exported target list adds SHARED IMPORTED library with IMPORTED_LOCATION property missing

When cmake install(EXPORT…) command executed it creates myprojectTargets.cmake file which is being used by downstream consuming project issuing find_package( myproject).
cmake writes to myprojectTargets.cmake file commands

# Create imported target myproject::myLib1
    add_library(myproject::myLib1 SHARED IMPORTED)
set_target_properties(myproject::myLib1 PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/myLib/include"
  INTERFACE_LINK_LIBRARIES "myproject::myLib2;myproject::myLib3;myproject::myLib3" #etc
)

There is no setting for IMPORTED_LOCATION which supposed to be a path to library.so (or dll.a) file.
What could be done to make cmake to insert it or for consuming project to get it but without me adding find_path(myproject::myLib1), find_library(myproject::myLib1) commands for the imported libraries ?

There should be a file named myprojectTargest-$<CONFIG>.cmake which contains the locations for that target for the given configuration. There should be a file(GLOB) followed by a loop which includes them in the plain myprojectTargets.cmake file.

Dear @ben.boeckel, I think you meant myprojectConfig.cmake, but that file is generated by cmake from my myprojectConfig.cmake.in template. So it contents determine what I included there. I could add set_target_property in this file and this is what I am doing as a workaround, but cmake itself does not generate myprojectConfig.cmake with " the locations for that target for the given configuration" or " file(GLOB) followed by a loop". cmake just expands macros (macro(set_and_check _var _file)) and variables like @PACKAGE_INIT@,@PACKAGE_PREFIX_DIR@, @AUTO_GEN_MSG@ from myprojectConfig.cmake.in template into myprojectConfig.cmake.
So did you mean that file/process?
In any case why would cmake writes command to ```set_target_properties in the myprojectTargets.cmake file for just 2 properties and for IMPORTED_LOCATION is some other place?

No. This file is indeed provided by you and should include the myprojectTargets.cmake file. The Targets.cmake file then includes the per-configuration bits on its own via a globbing mechanism.

Because the location/filename of a library differs based on configuration in multi-config generators. Instead of rewriting a single file, the per-configuration information is written to distinct files and then collected together later.

However, I’m looking at VTK now and I’m not seeing per-config files for single configuration generators, so maybe I’ve just been confused myself. It seems that the location information is written in the second half of the file in such cases. This behavior is likely due to the simplification of writing the config-independent bits in one chunk of code and then handling per-config either as separate files (multi-config generators) or as additional content (for single-config generators) separately.