Use standard cmake control variable to control static or dynamic build BUILD_SHARED_LIBS