From 80da9e62c15d54f0e0fb38c30f2d9fd533b03a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Wed, 29 Jan 2014 15:10:18 +0100 Subject: [PATCH] [Vendor] Use `MACOSX_DEPLOYMENT_TARGET` when building for OS X. Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-412 --- lib/motion/project/vendor.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb index 09773aad..d4c153ea 100644 --- a/lib/motion/project/vendor.rb +++ b/lib/motion/project/vendor.rb @@ -179,7 +179,16 @@ EOS xcopts = '' xcopts << "-target \"#{target}\" " if target xcopts << "-scheme \"#{scheme}\" " if scheme - command = "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} CONFIGURATION_BUILD_DIR=\"#{xcode_build_dir}\" IPHONEOS_DEPLOYMENT_TARGET=#{@config.deployment_target} build" + xcconfig = "CONFIGURATION_BUILD_DIR=\"#{xcode_build_dir}\" " + case platform + when "MacOSX" + xcconfig << "MACOSX_DEPLOYMENT_TARGET=#{@config.deployment_target} " + when /^iPhone/ + xcconfig << "IPHONEOS_DEPLOYMENT_TARGET=#{@config.deployment_target} " + else + App.fail "Unknown platform : #{platform}" + end + command = "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} #{xcconfig} build" unless App::VERBOSE command << " | env RM_XCPRETTY_PRINTER_PROJECT_ROOT='#{project_dir}' '#{File.join(@config.motiondir, 'vendor/XCPretty/bin/xcpretty')}' --printer '#{File.join(@config.motiondir, 'lib/motion/project/vendor/xcpretty_printer.rb')}'" end