--- cmake-1.0.tcl.orig	2014-03-09 15:29:45.000000000 +0900
+++ cmake-1.0.tcl	2014-04-05 21:55:35.000000000 +0900
@@ -116,10 +116,12 @@
                 -DCMAKE_OSX_ARCHITECTURES="${configure.build_arch}"
         }
         if {${configure.sdkroot} != ""} {
-            configure.args-append -DCMAKE_OSX_SYSROOT="${configure.sdkroot}"
+            configure.args-append -DCMAKE_OSX_SYSROOT="${configure.sdkroot}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}" 
         } else {
-            # Witout this, cmake will choose an SDK and deployment target on its own.
-            configure.args-append -DCMAKE_OSX_SYSROOT=/ -DCMAKE_OSX_DEPLOYMENT_TARGET=""
+            # Without this, cmake will choose an SDK and deployment target on its own.
+             set osxsdk [exec xcodebuild -sdk macosx -version Path]
+             configure.args-append -DCMAKE_OSX_SYSROOT="${osxsdk}" \
+                 -DCMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
         }
     }
 }
