Commits

Alex Szpakowski  committed de45b47

Use a separate preprocessor define for using Framework #includes in OS X (resolves issue #796)

  • Participants
  • Parent commits 9de8e48

Comments (0)

Files changed (9)

File platform/macosx/love-framework.xcodeproj/project.pbxproj

 				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;
 				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;

File platform/macosx/love.xcodeproj/project.pbxproj

 				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;
 				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;

File src/modules/audio/openal/Audio.h

 #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

File src/modules/audio/openal/Pool.h

 #include "thread/threads.h"
 
 // OpenAL
-#ifdef LOVE_MACOSX
+#ifdef LOVE_MACOSX_USE_FRAMEWORKS
 #include <OpenAL-Soft/alc.h>
 #include <OpenAL-Soft/al.h>
 #else

File src/modules/audio/openal/Source.h

 #include "sound/Decoder.h"
 
 // OpenAL
-#ifdef LOVE_MACOSX
+#ifdef LOVE_MACOSX_USE_FRAMEWORKS
 #include <OpenAL-Soft/alc.h>
 #include <OpenAL-Soft/al.h>
 #else

File src/modules/filesystem/physfs/File.h

 #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>

File src/modules/font/freetype/Font.h

 #include "font/Font.h"
 
 // FreeType2
-#ifdef LOVE_MACOSX
+#ifdef LOVE_MACOSX_USE_FRAMEWORKS
 #include <freetype/ft2build.h>
 #else
 #include <ft2build.h>

File src/modules/sound/lullaby/GmeDecoder.h

 #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>

File src/modules/sound/lullaby/Mpg123Decoder.h

 #include "Decoder.h"
 
 // libmpg123
-#ifdef LOVE_MACOSX
+#ifdef LOVE_MACOSX_USE_FRAMEWORKS
 #include <mpg123/mpg123.h>
 #else
 #include <mpg123.h>