Skip to content

Commit

Permalink
build: add configure option to generate xcode build files
Browse files Browse the repository at this point in the history
  • Loading branch information
tjfontaine authored and bnoordhuis committed Nov 5, 2012
1 parent d264b23 commit ac04716
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -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'

Expand All @@ -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:
Expand Down

0 comments on commit ac04716

Please sign in to comment.