cmake: build static libs if they are internal ones
there are chances that user or build script set `BUILD_SHARED_LIBS`,
so these convenience libraries (using the autotools' terminology)
are built and linked by never get installed.
Fixes: https://tracker.ceph.com/issues/38611
Fixes: https://tracker.ceph.com/issues/49080
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
df841b241efd387044d9637b1cf67d198bd1398e)
Conflicts:
src/blk/CMakeLists.txt
introduced in pacific https://github.com/ceph/ceph/pull/34622/files