improved macros for handling Mavericks-style Carbon headers; remove redundant extra addition of --stdlib=libc++ in CXXFLAGS on mavericks

This commit is contained in:
Paul Davis 2014-10-07 16:16:57 -04:00
parent a4aa74a5ee
commit d636e1df90
3 changed files with 6 additions and 4 deletions

View file

@ -25,7 +25,7 @@
/* an awful hack to stop Carbon #defines from messing with other code
*/
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#ifdef CARBON_FLAT_HEADERS
#include "MacTypes.h"
#else
#include "/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h"

View file

@ -55,7 +55,7 @@
#include "TargetConditionals.h"
// Determine whether or not to use framework style includes for system headers
#if !defined(CoreAudio_Use_Framework_Includes) && !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#if !defined(CoreAudio_Use_Framework_Includes) && !defined(__COREAUDIO_USE_FLAT_INCLUDES__) && !defined (CARBON_FLAT_HEADERS)
#if TARGET_RT_MAC_MACHO
#define CoreAudio_Use_Framework_Includes 1
#else
@ -65,7 +65,7 @@
// Include the regular ConditionalMacros.h too, since it has useful stuff that
// TargetConditionals.h lacks for some reason.
#if CoreAudio_Use_Framework_Includes && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
#if CoreAudio_Use_Framework_Includes
#include "ConditionalMacros.h"
#else
#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/ConditionalMacros.h>

View file

@ -210,7 +210,9 @@ def set_compiler_flags (conf,opt):
conf.env['build_target'] = opt.dist_target
if conf.env['build_target'] == 'mavericks':
cxx_flags.append('-stdlib=libc++')
# Mavericks and later changed the syntax to be used when including Carbon headers,
# from requiring a full path to requiring just the header name.
cxx_flags.append('-DCARBON_FLAT_HEADERS')
if conf.env['build_target'] == 'snowleopard':
#