add CMake definitions to build and install shared libraries and headers

This is a start of an install process. It installs the core functionality of this package, i.e. shared libraries and headers, but it does not yet install documentation and other metadata.