build: add configure option to generate xcode build files

This commit is contained in:
Timothy J Fontaine 2012-09-14 14:16:43 -04:00 committed by Ben Noordhuis
parent d264b23077
commit ac047166f6

8
configure vendored
View File

@ -230,6 +230,11 @@ parser.add_option("--unsafe-optimizations",
dest="unsafe_optimizations",
help=optparse.SUPPRESS_HELP)
parser.add_option("--xcode",
action="store_true",
dest="use_xcode",
help="Generate build files for use with xcode")
(options, args) = parser.parse_args()
@ -570,6 +575,7 @@ write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release',
'USE_NINJA': str(int(options.use_ninja or 0)),
'USE_XCODE': str(int(options.use_xcode or 0)),
}
config = '\n'.join(map('='.join, config.iteritems())) + '\n'
@ -578,6 +584,8 @@ write('config.mk',
if options.use_ninja:
gyp_args = ['-f', 'ninja']
elif options.use_xcode:
gyp_args = ['-f', 'xcode']
elif os.name == 'nt':
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=auto']
elif options.dest_os: