Main project provides CMake modules and configuration that extensions (built as separate projects) need to use. When using package config file(s) this works ok I think and projects then need to find the main package and adjust the CMAKE_MODULE_PATH to have access to main project’s CMake modules.
What about when a project installs CPS? Where and how could this be then resolved? Is it possible to specify some variable in CPS where CMake modules can be loaded from?
Where can a project install its CMake modules when using CPS?
The same place; <datadir>/cmake/<project>. It’s still a CMake module, and presumably it isn’t arch-dependent. (If it is, use <libdir> instead of <datadir>. And, to be fair, you probably won’t get lynched if you just use <libdir> whether or not it’s arch-dependent. )
Is it possible to specify some variable in CPS where CMake modules can be loaded from?
Not presently. It’s a known issue, but will require changes to CMake to solve.