build: macos: Handle w/o patch version returning case
In macOS monterey, `sw_vers -productVersion` will return `12.x` (w/o
patch version).
We don't need to handle patch version to determine proper value for
`MACOSX_DEPLOYMENT_TARGET` variable.
@@ -24,7 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
string(REPLACE "." ";" DEPLOYMENT_VERSION_LIST ${MACOSX_DEPLOYMENT_TARGET})
list(GET DEPLOYMENT_VERSION_LIST 0 MACOSX_DEPLOYMENT_TARGET_MAJOR)
list(GET DEPLOYMENT_VERSION_LIST 1 MACOSX_DEPLOYMENT_TARGET_MINOR)
- list(GET DEPLOYMENT_VERSION_LIST 2 MACOSX_DEPLOYMENT_TARGET_PATCH)
set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET_MAJOR}.${MACOSX_DEPLOYMENT_TARGET_MINOR}")
endif()
else()
