Actually, passing -DBUILD_SHARED_LIBS=OFF when using %cmake helps as well. So this should fix it: https://build.opensuse.org/request/show/406222