OLD | NEW |
(Empty) | |
| 1 { |
| 2 'targets': [ |
| 3 { |
| 4 'target_name': 'swift_framework', |
| 5 'type': 'shared_library', |
| 6 'mac_bundle': 1, |
| 7 'xcode_settings': { |
| 8 'DEFINES_MODULE': 'YES', |
| 9 'INFOPLIST_FILE': 'Info.plist', |
| 10 }, |
| 11 'sources': [ |
| 12 'MyObjcFrameworkClass.h', |
| 13 'MyObjcFrameworkClass.m', |
| 14 'MySwiftFrameworkClass.swift', |
| 15 'swift_framework.h', |
| 16 ], |
| 17 'mac_framework_headers': [ |
| 18 'MyObjcFrameworkClass.h', |
| 19 'swift_framework.h', |
| 20 ], |
| 21 }, |
| 22 { |
| 23 'target_name': 'swift_ios', |
| 24 'type': 'executable', |
| 25 'mac_bundle': '1', |
| 26 'xcode_settings': { |
| 27 'INFOPLIST_FILE': 'Info.plist', |
| 28 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
| 29 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/Frameworks'], |
| 30 'SWIFT_OBJC_BRIDGING_HEADER': '<(_target_name)-Bridging-Header.h', |
| 31 }, |
| 32 'dependencies': [ |
| 33 'swift_framework', |
| 34 ], |
| 35 'sources': [ |
| 36 'AppDelegate.h', |
| 37 'AppDelegate.m', |
| 38 'main.m', |
| 39 'MyObjcClass.h', |
| 40 'MyObjcClass.m', |
| 41 'MySecondSwiftClass.swift', |
| 42 'MySwiftClass.swift', |
| 43 ], |
| 44 }, |
| 45 { |
| 46 'target_name': 'swift_ios_tests', |
| 47 'type': 'loadable_module', |
| 48 'mac_bundle': '1', |
| 49 'product_extension': 'xctest', |
| 50 'variables': { |
| 51 'tested_target': 'swift_ios', |
| 52 }, |
| 53 'xcode_settings': { |
| 54 'BUNDLE_LOADER': '<(PRODUCT_DIR)/<(tested_target).app/<(tested_target)', |
| 55 'INFOPLIST_FILE': 'TestInfo.plist', |
| 56 'LD_RUNPATH_SEARCH_PATHS': [ |
| 57 '@executable_path/Frameworks', |
| 58 '@loader_path/Frameworks', |
| 59 ], |
| 60 'TEST_HOST': '$(BUNDLE_LOADER)', |
| 61 }, |
| 62 'dependencies': [ |
| 63 '<(tested_target)', |
| 64 ], |
| 65 'sources': [ |
| 66 'MyObjcTest.m', |
| 67 'MySwiftTest.swift', |
| 68 ], |
| 69 } |
| 70 ], |
| 71 'target_defaults': { |
| 72 'xcode_settings': { |
| 73 'GCC_OPTIMIZATION_LEVEL': '0', |
| 74 'CLANG_ENABLE_MODULES': 'YES', |
| 75 'CLANG_ENABLE_OBJC_ARC': 'YES', |
| 76 'CLANG_MODULE_CACHE_PATH': '<(PRODUCT_DIR)/ModuleCache', |
| 77 'CODE_SIGNING_REQUIRED': 'NO', |
| 78 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', |
| 79 'SWIFT_OPTIMIZATION_LEVEL': '-Onone', |
| 80 'TARGETED_DEVICE_FAMILY': '1,2', |
| 81 'conditions': [ |
| 82 ['"<(GENERATOR)"=="xcode"', { |
| 83 'SDKROOT': 'iphoneos', |
| 84 }, { |
| 85 'SDKROOT': 'iphonesimulator', |
| 86 }], |
| 87 ], |
| 88 }, |
| 89 'conditions': [ |
| 90 ['"<(GENERATOR)"=="ninja"', { |
| 91 'include_dirs': [ |
| 92 '<(INTERMEDIATE_DIR)', |
| 93 ], |
| 94 }], |
| 95 ], |
| 96 'mac_framework_dirs': [ |
| 97 '$(SDKROOT)/../../../Developer/Library/Frameworks', |
| 98 ], |
| 99 }, |
| 100 |
| 101 } |
OLD | NEW |