Property CMAKE_OSX_DEPLOYMENT_TARGET needs to be set on the cmake command-line, otherwise it generates a compilation error.