Rename all .cc files which include Objective-C headers to .mm.
This allows the Mac Make build to pass. We were hacking it in XCode with "-x objective-c++", but gyp/Make doesn't seem to accept that flag. Also switch Objective-C #includes to #imports. There is one file missing from this: vie_autotest_main.cc, because it's required on multiple platforms. I'm not immediately sure what the best approach is there, but the Objective-C headers should be somehow hidden. Review URL: http://webrtc-codereview.appspot.com/153005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@726 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a0258defd4
commit
199f4defd3
@ -9,8 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "video_capture_qtkit.h"
|
#include "video_capture_qtkit.h"
|
||||||
#include "video_capture_qtkit_objc.h"
|
#import "video_capture_qtkit_objc.h"
|
||||||
#include "video_capture_qtkit_info_objc.h"
|
#import "video_capture_qtkit_info_objc.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "critical_section_wrapper.h"
|
#include "critical_section_wrapper.h"
|
||||||
#include "../../video_capture_config.h"
|
#include "../../video_capture_config.h"
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "../../video_capture_config.h"
|
#include "../../video_capture_config.h"
|
||||||
#include "video_capture_qtkit_info_objc.h"
|
#import "video_capture_qtkit_info_objc.h"
|
||||||
|
|
||||||
#include "video_capture.h"
|
#include "video_capture.h"
|
||||||
|
|
@ -65,19 +65,16 @@
|
|||||||
'Mac/QTKit/video_capture_qtkit_info_objc.h',
|
'Mac/QTKit/video_capture_qtkit_info_objc.h',
|
||||||
'Mac/QTKit/video_capture_qtkit_objc.h',
|
'Mac/QTKit/video_capture_qtkit_objc.h',
|
||||||
'Mac/QTKit/video_capture_qtkit_utility.h',
|
'Mac/QTKit/video_capture_qtkit_utility.h',
|
||||||
'Mac/video_capture_mac.cc',
|
'Mac/video_capture_mac.mm',
|
||||||
'Mac/QTKit/video_capture_qtkit.cc',
|
'Mac/QTKit/video_capture_qtkit.mm',
|
||||||
'Mac/QTKit/video_capture_qtkit_objc.mm',
|
'Mac/QTKit/video_capture_qtkit_objc.mm',
|
||||||
'Mac/QTKit/video_capture_recursive_lock.mm',
|
'Mac/QTKit/video_capture_recursive_lock.mm',
|
||||||
'Mac/QTKit/video_capture_qtkit_info.cc',
|
'Mac/QTKit/video_capture_qtkit_info.mm',
|
||||||
'Mac/QTKit/video_capture_qtkit_info_objc.mm',
|
'Mac/QTKit/video_capture_qtkit_info_objc.mm',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'Mac',
|
'Mac',
|
||||||
],
|
],
|
||||||
'xcode_settings': {
|
|
||||||
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
|
||||||
},
|
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
'OTHER_LDFLAGS': [
|
'OTHER_LDFLAGS': [
|
||||||
@ -185,7 +182,7 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
# Exclude the test targets when building with chromium.
|
# Exclude the test targets when building with chromium.
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['build_with_chromium==0', {
|
['build_with_chromium==0', {
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
@ -244,6 +241,8 @@
|
|||||||
}],
|
}],
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
|
# TODO(andrew): remove this. Shouldn't be needed when required
|
||||||
|
# files have proper .mm extensions.
|
||||||
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
||||||
'OTHER_LDFLAGS': [
|
'OTHER_LDFLAGS': [
|
||||||
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
|
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
|
||||||
|
@ -14,18 +14,18 @@
|
|||||||
#ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_
|
#ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_
|
||||||
#define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_
|
#define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_
|
||||||
|
|
||||||
#include <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <OpenGL/OpenGL.h>
|
||||||
|
#import <OpenGL/glu.h>
|
||||||
|
#import <OpenGL/glext.h>
|
||||||
#include <QuickTime/QuickTime.h>
|
#include <QuickTime/QuickTime.h>
|
||||||
#include <OpenGL/OpenGL.h>
|
|
||||||
#include <OpenGL/glu.h>
|
|
||||||
#include <OpenGL/glext.h>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "video_render_defines.h"
|
#include "video_render_defines.h"
|
||||||
|
|
||||||
#import "cocoa_render_view.h"
|
#import "cocoa_render_view.h"
|
||||||
#import "cocoa_full_screen_window.h"
|
#import "cocoa_full_screen_window.h"
|
||||||
|
|
||||||
class Trace;
|
class Trace;
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@
|
|||||||
'linux/video_x11_channel.cc',
|
'linux/video_x11_channel.cc',
|
||||||
'linux/video_x11_render.cc',
|
'linux/video_x11_render.cc',
|
||||||
# Mac
|
# Mac
|
||||||
'mac/video_render_nsopengl.cc',
|
'mac/video_render_nsopengl.mm',
|
||||||
'mac/video_render_mac_cocoa_impl.cc',
|
'mac/video_render_mac_cocoa_impl.mm',
|
||||||
'mac/video_render_agl.cc',
|
'mac/video_render_agl.cc',
|
||||||
'mac/video_render_mac_carbon_impl.cc',
|
'mac/video_render_mac_carbon_impl.cc',
|
||||||
'mac/cocoa_render_view.mm',
|
'mac/cocoa_render_view.mm',
|
||||||
@ -79,8 +79,9 @@
|
|||||||
# External
|
# External
|
||||||
'external/video_render_external_impl.cc',
|
'external/video_render_external_impl.cc',
|
||||||
],
|
],
|
||||||
|
# TODO(andrew): with the proper suffix, these files will be excluded
|
||||||
|
# automatically.
|
||||||
'conditions': [
|
'conditions': [
|
||||||
# DEFINE PLATFORM SPECIFIC SOURCE FILES
|
|
||||||
['OS!="linux" or build_with_chromium==1', {
|
['OS!="linux" or build_with_chromium==1', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'linux/video_render_linux_impl.h',
|
'linux/video_render_linux_impl.h',
|
||||||
@ -99,8 +100,8 @@
|
|||||||
'mac/video_render_mac_carbon_impl.h',
|
'mac/video_render_mac_carbon_impl.h',
|
||||||
'mac/video_render_mac_cocoa_impl.h',
|
'mac/video_render_mac_cocoa_impl.h',
|
||||||
'mac/video_render_nsopengl.h',
|
'mac/video_render_nsopengl.h',
|
||||||
'mac/video_render_nsopengl.cc',
|
'mac/video_render_nsopengl.mm',
|
||||||
'mac/video_render_mac_cocoa_impl.cc',
|
'mac/video_render_mac_cocoa_impl.mm',
|
||||||
'mac/video_render_agl.cc',
|
'mac/video_render_agl.cc',
|
||||||
'mac/video_render_mac_carbon_impl.cc',
|
'mac/video_render_mac_carbon_impl.cc',
|
||||||
'mac/cocoa_render_view.mm',
|
'mac/cocoa_render_view.mm',
|
||||||
@ -118,36 +119,27 @@
|
|||||||
'windows/video_render_windows_impl.cc',
|
'windows/video_render_windows_impl.cc',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
# DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS
|
|
||||||
['OS=="mac"', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++'
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
] # conditions
|
] # conditions
|
||||||
}, # video_render_module
|
}, # video_render_module
|
||||||
], # targets
|
], # targets
|
||||||
# Exclude the test target when building with chromium.
|
|
||||||
'conditions': [
|
# Exclude the test target when building with chromium.
|
||||||
|
'conditions': [
|
||||||
['build_with_chromium==0', {
|
['build_with_chromium==0', {
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'video_render_module_test',
|
'target_name': 'video_render_module_test',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'video_render_module',
|
'video_render_module',
|
||||||
'webrtc_utility',
|
'webrtc_utility',
|
||||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
'<(webrtc_root)/common_video/common_video.gyp:webrtc_vplib',
|
'<(webrtc_root)/common_video/common_video.gyp:webrtc_vplib',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'sources': [
|
||||||
],
|
|
||||||
'sources': [
|
|
||||||
# sources
|
|
||||||
'../test/testAPI/testAPI.cpp',
|
'../test/testAPI/testAPI.cpp',
|
||||||
], # source
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
# DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS
|
|
||||||
['OS=="mac" or OS=="linux"', {
|
['OS=="mac" or OS=="linux"', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-Wno-write-strings',
|
'-Wno-write-strings',
|
||||||
@ -160,11 +152,13 @@
|
|||||||
'libraries': [
|
'libraries': [
|
||||||
'-lrt',
|
'-lrt',
|
||||||
'-lXext',
|
'-lXext',
|
||||||
'-lX11',
|
'-lX11',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
|
# TODO(andrew): remove this. It shouldn't be needed when the
|
||||||
|
# required files have proper .mm extensions.
|
||||||
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
||||||
'OTHER_LDFLAGS': [
|
'OTHER_LDFLAGS': [
|
||||||
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL',
|
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL',
|
||||||
|
@ -27,13 +27,11 @@
|
|||||||
#elif defined (WEBRTC_ANDROID)
|
#elif defined (WEBRTC_ANDROID)
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#elif defined(WEBRTC_LINUX)
|
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#elif defined(WEBRTC_MAC_INTEL)
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Choose how to log
|
// Choose how to log
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
# Linux
|
# Linux
|
||||||
'source/vie_autotest_linux.cc',
|
'source/vie_autotest_linux.cc',
|
||||||
# Mac
|
# Mac
|
||||||
'source/vie_autotest_mac_cocoa.cc',
|
'source/vie_autotest_mac_cocoa.mm',
|
||||||
'source/vie_autotest_mac_carbon.cc',
|
'source/vie_autotest_mac_carbon.cc',
|
||||||
# Windows
|
# Windows
|
||||||
'source/vie_autotest_windows.cc',
|
'source/vie_autotest_windows.cc',
|
||||||
@ -121,6 +121,8 @@
|
|||||||
}],
|
}],
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
|
# TODO(andrew): remove this when the issue with Objective-C in
|
||||||
|
# vie_autotest_main.cc is worked out.
|
||||||
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
'OTHER_CPLUSPLUSFLAGS': '-x objective-c++',
|
||||||
'OTHER_LDFLAGS': [
|
'OTHER_LDFLAGS': [
|
||||||
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
|
'-framework Foundation -framework AppKit -framework Cocoa -framework OpenGL -framework CoreVideo -framework CoreAudio -framework AudioToolbox',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user