cxxmodules: Fix some issues module exporting
The following issues were addressed:
-
When setting the
IMPORTED_CXX_MODULES_[CONFIG]
target property, there was a missing path separator between a module's file name and its relative directory. -
Calling
install(EXPORT)
with theCXX_MODULES_DIRECTORY
parameter leads to installation rules being generated whichinclude()
CMake scripts that set theIMPORTED_CXX_MODULES_[CONFIG]
target property for relevant targets. However, these scripts don't get generated for targets in an export set which don't have any C++20 modules. When the installation rules attempt toinclude()
the missing scripts, the install fails.