Skip to content

Commit

Permalink
Use a separate preprocessor define for using Framework #includes in O…
Browse files Browse the repository at this point in the history
…S X (resolves issue #796)
  • Loading branch information
slime73 committed Dec 13, 2013
1 parent 740347b commit eb4fdf3
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions platform/macosx/love-framework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = "";
GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
Expand Down Expand Up @@ -2376,7 +2376,7 @@
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = "";
GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
Expand Down
2 changes: 2 additions & 0 deletions platform/macosx/love.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
Expand Down Expand Up @@ -354,6 +355,7 @@
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_INPUT_FILETYPE = automatic;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = LOVE_MACOSX_USE_FRAMEWORKS;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/audio/openal/Audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "thread/threads.h"

// OpenAL
#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS // Frameworks have different include paths.
#include <OpenAL-Soft/alc.h>
#include <OpenAL-Soft/al.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion src/modules/audio/openal/Pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "thread/threads.h"

// OpenAL
#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <OpenAL-Soft/alc.h>
#include <OpenAL-Soft/al.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion src/modules/audio/openal/Source.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "sound/Decoder.h"

// OpenAL
#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <OpenAL-Soft/alc.h>
#include <OpenAL-Soft/al.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion src/modules/filesystem/physfs/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "filesystem/File.h"

// PhysFS
#ifdef LOVE_MACOSX // wacky Mac behavior means different #include syntax!
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <physfs/physfs.h>
#else
#include <physfs.h>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/font/freetype/Font.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "font/Font.h"

// FreeType2
#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <freetype/ft2build.h>
#else
#include <ft2build.h>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/sound/lullaby/GmeDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "common/Data.h"
#include "Decoder.h"

#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <Game_Music_Emu/gme.h>
#else
#include <gme.h>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/sound/lullaby/Mpg123Decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "Decoder.h"

// libmpg123
#ifdef LOVE_MACOSX
#ifdef LOVE_MACOSX_USE_FRAMEWORKS
#include <mpg123/mpg123.h>
#else
#include <mpg123.h>
Expand Down

0 comments on commit eb4fdf3

Please sign in to comment.