Dynamic library against static library: remember to add -fPIC
There is a known problem in cmake - fPIC must be manually added when a dynamic library is linked against static one.
This must be somehow detected that a static library is a dependency of a dynamic library, even intermediately.
For cases that cannot be autodetected (e.g. when a dependent library is in a subdirectory), there should be also some special flag (maybe to libspec?) added to this static library database to prepare it for being capable of getting linked a dynamic library against.