Merge pull request #682 from lsolanka/pr.unify-cmake-build

Unify the CMake targets for static and shared libraries