Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame^] | 1 | # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | { |
| 5 | 'conditions': [ |
| 6 | ['"<(GENERATOR)"=="ninja"', { |
| 7 | 'make_global_settings': [ |
| 8 | ['CC', '/usr/bin/clang'], |
| 9 | ['CXX', '/usr/bin/clang++'], |
| 10 | ], |
| 11 | }] |
| 12 | ], |
| 13 | 'target_defaults': { |
| 14 | 'xcode_settings': { |
| 15 | 'OTHER_CFLAGS': [ |
| 16 | '-fobjc-abi-version=2', |
| 17 | ], |
| 18 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
| 19 | 'SDKROOT': 'iphonesimulator', # -isysroot |
| 20 | 'CONFIGURATION_BUILD_DIR':'build/Default', |
| 21 | 'IPHONEOS_DEPLOYMENT_TARGET': '9.0', |
| 22 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 23 | } |
| 24 | }, |
| 25 | 'targets': [ |
| 26 | { |
| 27 | 'target_name': 'app_under_test', |
| 28 | 'type': 'executable', |
| 29 | 'mac_bundle': 1, |
| 30 | 'mac_bundle_resources': [ |
| 31 | 'App/Base.lproj/LaunchScreen.xib', |
| 32 | 'App/Base.lproj/Main.storyboard', |
| 33 | ], |
| 34 | 'sources': [ |
| 35 | 'App/AppDelegate.h', |
| 36 | 'App/AppDelegate.m', |
| 37 | 'App/ViewController.h', |
| 38 | 'App/ViewController.m', |
| 39 | 'App/main.m', |
| 40 | ], |
| 41 | 'link_settings': { |
| 42 | 'libraries': [ |
| 43 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 44 | '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', |
| 45 | ], |
| 46 | }, |
| 47 | 'xcode_settings': { |
| 48 | 'INFOPLIST_FILE': 'App/Info.plist', |
| 49 | }, |
| 50 | }, |
| 51 | { |
| 52 | 'target_name': 'app_tests', |
| 53 | 'type': 'loadable_module', |
| 54 | 'mac_xctest_bundle': 1, |
| 55 | 'sources': [ |
| 56 | 'AppTests/AppTests.m', |
| 57 | ], |
| 58 | 'dependencies': [ |
| 59 | 'app_under_test' |
| 60 | ], |
| 61 | 'link_settings': { |
| 62 | 'libraries': [ |
| 63 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 64 | ], |
| 65 | }, |
| 66 | 'xcode_settings': { |
| 67 | 'WRAPPER_EXTENSION': 'xctest', |
| 68 | 'INFOPLIST_FILE': 'AppTests/Info.plist', |
| 69 | 'BUNDLE_LOADER': '$(BUILT_PRODUCTS_DIR)/app_under_test.app/app_under_test', |
| 70 | 'TEST_HOST': '$(BUNDLE_LOADER)', |
| 71 | }, |
| 72 | }, |
| 73 | ], |
| 74 | } |