In precice/precice#1077, the default CMake build type changed from static objects to shared objects. Therefore, we don't need to specify the -DBUILD_SHARED_LIBS=ON when building preCICE. However, we need to mention that this is still the case for older versions.
I can update this in the context of releasing preCICE v2.3.