Is the only thing that differs between different OSX versions the location of XCode? 

If not, maybe you can simplify this to:

+            SET (CMAKE_OSX_DEPLOYMENT_TARGET "10."${OSX_VERSION_MINOR} CACHE STRING "The minimum version of OS X to support" FORCE)
 +            SET (CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10."${OSX_VERSION_MINOR}".sdk" CACHE STRING "OS X SDK" FORCE)

(or something like that)