Compile rtc_base_objc for Mac.

BUG=

Review URL: https://codereview.webrtc.org/1705513002

Cr-Commit-Position: refs/heads/master@{#11661}
This commit is contained in:
tkchin 2016-02-17 14:44:52 -08:00 committed by Commit bot
parent e3c6c82717
commit ee75c7a78f
3 changed files with 57 additions and 7 deletions

View File

@ -22,13 +22,12 @@
}],
],
}],
# TODO(tkchin): Mac support. There are a bunch of problems right now because
# of some settings pulled down from Chromium.
['OS=="ios"', {
['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', {
'targets': [
{
'target_name': 'rtc_base_objc',
'type': 'static_library',
'includes': [ '../build/objc_common.gypi' ],
'dependencies': [
'rtc_base',
],
@ -60,10 +59,6 @@
},
}],
],
'xcode_settings': {
'CLANG_ENABLE_OBJC_ARC': 'YES',
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
},
}
],
}], # OS=="ios"

View File

@ -0,0 +1,34 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
#if !defined(__has_feature) || !__has_feature(nullability)
#error "This file requires nullability support."
#endif
// The following nonnull macros were introduced in OSX SDK 10.10.3. However,
// the bots appear to be running something older. We define them here if they
// aren't already defined in NSObjCRuntime.h
#ifdef __OBJC__
#include <Foundation/NSObjCRuntime.h>
#if !defined(NS_ASSUME_NONNULL_BEGIN)
#define NS_ASSUME_NONNULL_BEGIN
#endif
#if !defined(NS_ASSUME_NONNULL_END)
#define NS_ASSUME_NONNULL_END
#endif
#endif

View File

@ -0,0 +1,21 @@
# Copyright 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# ObjC target common prefix header.
{
'variables': {
'objc_prefix_file': './WebRTC-Prefix.pch',
},
'xcode_settings': {
'CLANG_ENABLE_OBJC_ARC': 'YES',
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
'GCC_PREFIX_HEADER': '<(objc_prefix_file)',
'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'
},
}