[Vendor] Use MACOSX_DEPLOYMENT_TARGET when building for OS X.

Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-412
This commit is contained in:
Eloy Durán
2014-01-29 15:10:18 +01:00
parent 2c81a203b9
commit 27369a1e18
2 changed files with 12 additions and 1 deletions

2
NEWS
View File

@@ -1,6 +1,8 @@
= RubyMotion 2.21 =
* Fixed a bug which `motion update --cache-version=X' is broken.
* Fixed a bug where vendored Xcode OS X projects were build with the
IPHONEOS_DEPLOYMENT_TARGET option instead of MACOSX_DEPLOYMENT_TARGET.
= RubyMotion 2.20 =

View File

@@ -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