Fixed OS X build.

This commit is contained in:
Martín Lucas Golini
2012-12-16 00:36:25 -03:00
parent fcff1cb915
commit 63f47da256
7 changed files with 167 additions and 99 deletions

View File

@@ -1,4 +1,5 @@
syntax: glob
*.DS_Store
data/**
fonts/**
obj/**
@@ -24,4 +25,4 @@ projects/src/**
projects/android-project/data/**
projects/android-project/gen/**
log.log
ee*
ee*

View File

@@ -5,16 +5,6 @@
#endif
#if (TARGET_OS_IPHONE == 1) || (TARGET_OS_MAC == 1) && (!defined CP_USE_CGPOINTS)
#define CP_USE_CGPOINTS 1
#endif
#if CP_USE_CGPOINTS == 1
#if TARGET_OS_IPHONE
#import <CoreGraphics/CGGeometry.h>
#elif TARGET_OS_MAC
#include <ApplicationServices/ApplicationServices.h>
#endif
#if defined(__LP64__) && __LP64__
#define CP_USE_DOUBLES 1
#else

View File

@@ -33,7 +33,7 @@ solution "eepp"
elseif os.is("windows") then
multiple_insert( os_links, { "OpenAL32", "opengl32", "mingw32", "glu32", "gdi32", "-static-libgcc -static-libstdc++ -mwindows" } )
elseif os.is("macosx") then
multiple_insert( os_links, { "-framework OpenGL -framework OpenAL -framework CoreFoundation -framework AGL" } )
multiple_insert( os_links, { "OpenGL.framework", "OpenAL.framework", "CoreFoundation.framework", "AGL.framework" } )
elseif os.is("freebsd") then
multiple_insert( os_links, { "rt", "pthread", "X11", "openal", "GL", "Xcursor" } )
elseif os.is("haiku") then
@@ -183,6 +183,24 @@ solution "eepp"
buildoptions{ "-Wall" }
targetname "haikuttf"
project "jpeg-compressor-static"
kind "StaticLib"
language "C++"
targetdir("libs/" .. os.get() .. "/helpers/")
files { "src/eepp/helper/jpeg-compressor/*.cpp" }
configuration "debug"
defines { "DEBUG" }
flags { "Symbols" }
buildoptions{ "-Wall" }
targetname "jpeg-compressor-debug"
configuration "release"
defines { "NDEBUG" }
flags { "Optimize" }
buildoptions{ "-Wall" }
targetname "jpeg-compressor"
project "eepp-shared"
kind "SharedLib"
language "C++"
@@ -194,7 +212,8 @@ solution "eepp"
"haikuttf-static",
"zlib-static",
"libzip-static",
"stb_vorbis-static"
"stb_vorbis-static",
"jpeg-compressor-static"
}
if os.is("windows") then
@@ -248,6 +267,8 @@ solution "eepp"
end
multiple_insert( link_list, os_links )
links { link_list }
configuration "windows"
files { "src/eepp/window/platform/win/*.cpp" }

View File

@@ -1,5 +1,7 @@
#define EE_BACKEND_SDL_ACTIVE
#define EE_BACKEND_ALLEGRO_ACTIVE
#define EE_BACKEND_SFML_ACTIVE
#define EE_BACKEND_SDL2
#define EE_BACKEND_SDL_1_2
#define EE_SDL_VERSION_2
#define EE_X11_PLATFORM

View File

@@ -8,7 +8,6 @@
../../include/eepp/audio/csoundbuffer.hpp
../../include/eepp/audio/csound.hpp
../../include/eepp/audio/cmusic.hpp
../../include/eepp/audio/caudioresource.hpp
../../include/eepp/audio/caudiolistener.hpp
../../include/eepp/audio/caudiodevice.hpp
../../include/eepp/audio/base.hpp
@@ -20,7 +19,6 @@
../../src/eepp/audio/csoundbuffer.cpp
../../src/eepp/audio/csound.cpp
../../src/eepp/audio/cmusic.cpp
../../src/eepp/audio/caudioresource.cpp
../../src/eepp/audio/caudiolistener.cpp
../../src/eepp/audio/caudiodevice.cpp
../../include/eepp/base/utf.hpp
@@ -92,18 +90,17 @@
../../include/eepp/gaming/cisomap.hpp
../../include/eepp/gaming/cgameobjectvirtual.hpp
../../include/eepp/gaming/cgameobjectsprite.hpp
../../include/eepp/gaming/cgameobjectshapeex.hpp
../../include/eepp/gaming/cgameobjectshape.hpp
../../include/eepp/gaming/cgameobjectsubtextureex.hpp
../../include/eepp/gaming/cgameobjectsubtexture.hpp
../../include/eepp/gaming/cgameobject.hpp
../../include/eepp/gaming/base.hpp
../../include/eepp/gaming/mapeditor/cuimapnew.hpp
../../include/eepp/gaming/mapeditor/cuimap.hpp
../../include/eepp/gaming/mapeditor/cuilayernew.hpp
../../include/eepp/gaming/mapeditor/cuigotypenew.hpp
../../include/eepp/gaming/mapeditor/cmapproperties.hpp
../../src/eepp/gaming/mapeditor/cuimapnew.hpp
../../src/eepp/gaming/mapeditor/cuimap.hpp
../../src/eepp/gaming/mapeditor/cuilayernew.hpp
../../src/eepp/gaming/mapeditor/cuigotypenew.hpp
../../src/eepp/gaming/mapeditor/cmapproperties.hpp
../../include/eepp/gaming/mapeditor/cmapeditor.hpp
../../include/eepp/gaming/mapeditor/clayerproperties.hpp
../../include/eepp/gaming/mapeditor/base.hpp
../../src/eepp/gaming/mapeditor/clayerproperties.hpp
../../src/eepp/gaming/ctilelayer.cpp
../../src/eepp/gaming/cobjectlayer.cpp
../../src/eepp/gaming/cmap.cpp
@@ -113,8 +110,8 @@
../../src/eepp/gaming/cisomap.cpp
../../src/eepp/gaming/cgameobjectvirtual.cpp
../../src/eepp/gaming/cgameobjectsprite.cpp
../../src/eepp/gaming/cgameobjectshapeex.cpp
../../src/eepp/gaming/cgameobjectshape.cpp
../../src/eepp/gaming/cgameobjectsubtextureex.cpp
../../src/eepp/gaming/cgameobjectsubtexture.cpp
../../src/eepp/gaming/cgameobject.cpp
../../src/eepp/gaming/mapeditor/cuimapnew.cpp
../../src/eepp/gaming/mapeditor/cuimap.cpp
@@ -123,32 +120,32 @@
../../src/eepp/gaming/mapeditor/cmapproperties.cpp
../../src/eepp/gaming/mapeditor/cmapeditor.cpp
../../src/eepp/gaming/mapeditor/clayerproperties.cpp
../../include/eepp/graphics/blendmode.hpp
../../src/eepp/graphics/blendmode.cpp
../../include/eepp/graphics/vbohelper.hpp
../../include/eepp/graphics/renders.hpp
../../include/eepp/graphics/pixelperfect.hpp
../../include/eepp/graphics/packerhelper.hpp
../../include/eepp/graphics/glhelper.hpp
../../include/eepp/graphics/fonthelper.hpp
../../include/eepp/graphics/cvertexbuffervbo.hpp
../../include/eepp/graphics/cvertexbufferogl.hpp
../../include/eepp/graphics/cvertexbuffermanager.hpp
../../src/eepp/graphics/cvertexbuffermanager.hpp
../../include/eepp/graphics/cvertexbuffer.hpp
../../include/eepp/graphics/cttffontloader.hpp
../../include/eepp/graphics/cttffont.hpp
../../include/eepp/graphics/ctexturepackertex.hpp
../../include/eepp/graphics/ctexturepackernode.hpp
../../src/eepp/graphics/ctexturepackertex.hpp
../../src/eepp/graphics/ctexturepackernode.hpp
../../include/eepp/graphics/ctexturepacker.hpp
../../include/eepp/graphics/ctextureloader.hpp
../../include/eepp/graphics/ctexturegrouploader.hpp
../../include/eepp/graphics/ctextureatlasloader.hpp
../../include/eepp/graphics/ctexturefontloader.hpp
../../include/eepp/graphics/ctexturefont.hpp
../../include/eepp/graphics/ctexturefactory.hpp
../../include/eepp/graphics/ctexture.hpp
../../include/eepp/graphics/ctextcache.hpp
../../include/eepp/graphics/csprite.hpp
../../include/eepp/graphics/cshapegroupmanager.hpp
../../include/eepp/graphics/cshapegroup.hpp
../../include/eepp/graphics/cshape.hpp
../../include/eepp/graphics/ctextureatlasmanager.hpp
../../include/eepp/graphics/ctextureatlas.hpp
../../include/eepp/graphics/csubtexture.hpp
../../include/eepp/graphics/cshaderprogrammanager.hpp
../../include/eepp/graphics/cshaderprogram.hpp
../../include/eepp/graphics/cshader.hpp
@@ -157,11 +154,9 @@
../../include/eepp/graphics/cparticlesystem.hpp
../../include/eepp/graphics/cparticle.hpp
../../include/eepp/graphics/cimage.hpp
../../include/eepp/graphics/cglobalshapegroup.hpp
../../include/eepp/graphics/cglobaltextureatlas.hpp
../../include/eepp/graphics/cglobalbatchrenderer.hpp
../../include/eepp/graphics/cframebufferpbuffer.hpp
../../include/eepp/graphics/cframebuffermanager.hpp
../../include/eepp/graphics/cframebufferfbo.hpp
../../src/eepp/graphics/cframebuffermanager.hpp
../../include/eepp/graphics/cframebuffer.hpp
../../include/eepp/graphics/cfontmanager.hpp
../../include/eepp/graphics/cfont.hpp
@@ -175,7 +170,6 @@
../../include/eepp/math/math.hpp
../../include/eepp/math/cmtrand.hpp
../../include/eepp/math/base.hpp
../../src/eepp/math/math.cpp
../../src/eepp/math/cmtrand.cpp
../../include/eepp/physics/settings.hpp
../../include/eepp/physics/physicshelper.hpp
@@ -278,10 +272,9 @@
../../include/eepp/ui/cuibackground.hpp
../../include/eepp/ui/cuiaquatheme.hpp
../../include/eepp/ui/base.hpp
../../include/eepp/ui/tools/ctexturegroupshapeeditor.hpp
../../include/eepp/ui/tools/ctexturegroupnew.hpp
../../include/eepp/ui/tools/ctexturegroupeditor.hpp
../../src/eepp/ui/uihelper.cpp
../../src/eepp/ui/tools/ctextureatlassubtextureeditor.hpp
../../src/eepp/ui/tools/ctextureatlasnew.hpp
../../include/eepp/ui/tools/ctextureatlaseditor.hpp
../../src/eepp/ui/cuiwinmenu.cpp
../../src/eepp/ui/cuiwindow.cpp
../../src/eepp/ui/cuitooltip.cpp
@@ -333,34 +326,32 @@
../../src/eepp/ui/cuiborder.cpp
../../src/eepp/ui/cuibackground.cpp
../../src/eepp/ui/cuiaquatheme.cpp
../../src/eepp/ui/tools/ctexturegroupshapeeditor.cpp
../../src/eepp/ui/tools/ctexturegroupnew.cpp
../../src/eepp/ui/tools/ctexturegroupeditor.cpp
../../include/eepp/utils/vector3.hpp
../../include/eepp/utils/vector2.hpp
../../include/eepp/utils/utils.hpp
../../include/eepp/utils/triangle2.hpp
../../include/eepp/utils/string.hpp
../../include/eepp/utils/size.hpp
../../include/eepp/utils/safedatapointer.hpp
../../include/eepp/utils/rect.hpp
../../include/eepp/utils/quad2.hpp
../../include/eepp/utils/polygon2.hpp
../../include/eepp/utils/line2.hpp
../../include/eepp/utils/helper.hpp
../../include/eepp/utils/easing.hpp
../../include/eepp/utils/cwaypoints.hpp
../../include/eepp/utils/cperlinnoise.hpp
../../include/eepp/utils/colors.hpp
../../include/eepp/utils/cinterpolation.hpp
../../include/eepp/utils/base.hpp
../../src/eepp/utils/utils.cpp
../../src/eepp/utils/string.cpp
../../src/eepp/utils/safedatapointer.cpp
../../src/eepp/utils/easing.cpp
../../src/eepp/utils/cwaypoints.cpp
../../src/eepp/utils/cperlinnoise.cpp
../../src/eepp/utils/cinterpolation.cpp
../../src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp
../../src/eepp/ui/tools/ctextureatlasnew.cpp
../../src/eepp/ui/tools/ctextureatlaseditor.cpp
../../include/eepp/math/vector3.hpp
../../include/eepp/math/vector2.hpp
../../include/eepp/system/bitop.hpp
../../include/eepp/math/triangle2.hpp
../../include/eepp/system/sys.hpp
../../src/eepp/system/sys.cpp
../../include/eepp/math/size.hpp
../../include/eepp/system/safedatapointer.hpp
../../include/eepp/math/rect.hpp
../../include/eepp/math/quad2.hpp
../../include/eepp/math/polygon2.hpp
../../include/eepp/math/line2.hpp
../../include/eepp/math/helper.hpp
../../include/eepp/math/easing.hpp
../../include/eepp/math/cwaypoints.hpp
../../include/eepp/math/cperlinnoise.hpp
../../include/eepp/system/colors.hpp
../../include/eepp/math/cinterpolation.hpp
../../src/eepp/system/safedatapointer.cpp
../../src/eepp/math/easing.cpp
../../src/eepp/math/cwaypoints.cpp
../../src/eepp/math/cperlinnoise.cpp
../../src/eepp/math/cinterpolation.cpp
../../include/eepp/window/keycodes.hpp
../../include/eepp/window/joycodes.hpp
../../include/eepp/window/inputhelper.hpp
@@ -378,7 +369,6 @@
../../include/eepp/window/ccursormanager.hpp
../../include/eepp/window/ccursor.hpp
../../include/eepp/window/cclipboard.hpp
../../include/eepp/window/cbackend.hpp
../../include/eepp/window/base.hpp
../../src/eepp/window/inputhelper.cpp
../../src/eepp/window/cwindow.cpp
@@ -409,22 +399,22 @@
../../src/eepp/window/backend/SDL/ccursorsdl.cpp
../../src/eepp/window/backend/SDL/ccursormanagersdl.cpp
../../src/eepp/window/backend/SDL/cclipboardsdl.cpp
../../src/eepp/window/backend/SDL2/cwindowsdl.hpp
../../src/eepp/window/backend/SDL2/cjoysticksdl.hpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl.hpp
../../src/eepp/window/backend/SDL2/cinputsdl.hpp
../../src/eepp/window/backend/SDL2/ccursorsdl.hpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl.hpp
../../src/eepp/window/backend/SDL2/cclipboardsdl.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl.hpp
../../src/eepp/window/backend/SDL2/cwindowsdl2.hpp
../../src/eepp/window/backend/SDL2/cjoysticksdl2.hpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp
../../src/eepp/window/backend/SDL2/cinputsdl2.hpp
../../src/eepp/window/backend/SDL2/ccursorsdl2.hpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp
../../src/eepp/window/backend/SDL2/cclipboardsdl2.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl2.hpp
../../src/eepp/window/backend/SDL2/base.hpp
../../src/eepp/window/backend/SDL2/cwindowsdl.cpp
../../src/eepp/window/backend/SDL2/cjoysticksdl.cpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl.cpp
../../src/eepp/window/backend/SDL2/cinputsdl.cpp
../../src/eepp/window/backend/SDL2/ccursorsdl.cpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl.cpp
../../src/eepp/window/backend/SDL2/cclipboardsdl.cpp
../../src/eepp/window/backend/SDL2/cwindowsdl2.cpp
../../src/eepp/window/backend/SDL2/cjoysticksdl2.cpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl2.cpp
../../src/eepp/window/backend/SDL2/cinputsdl2.cpp
../../src/eepp/window/backend/SDL2/ccursorsdl2.cpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp
../../src/eepp/window/backend/SDL2/cclipboardsdl2.cpp
../../src/eepp/window/backend/allegro5/cwindowal.hpp
../../src/eepp/window/backend/allegro5/cjoystickmanageral.hpp
../../src/eepp/window/backend/allegro5/cjoystickal.hpp
@@ -480,16 +470,16 @@
../../src/eepp/graphics/ctexturepackernode.cpp
../../src/eepp/graphics/ctexturepacker.cpp
../../src/eepp/graphics/ctextureloader.cpp
../../src/eepp/graphics/ctexturegrouploader.cpp
../../src/eepp/graphics/ctextureatlasloader.cpp
../../src/eepp/graphics/ctexturefontloader.cpp
../../src/eepp/graphics/ctexturefont.cpp
../../src/eepp/graphics/ctexturefactory.cpp
../../src/eepp/graphics/ctexture.cpp
../../src/eepp/graphics/ctextcache.cpp
../../src/eepp/graphics/csprite.cpp
../../src/eepp/graphics/cshapegroupmanager.cpp
../../src/eepp/graphics/cshapegroup.cpp
../../src/eepp/graphics/cshape.cpp
../../src/eepp/graphics/ctextureatlasmanager.cpp
../../src/eepp/graphics/ctextureatlas.cpp
../../src/eepp/graphics/csubtexture.cpp
../../src/eepp/graphics/cshaderprogrammanager.cpp
../../src/eepp/graphics/cshaderprogram.cpp
../../src/eepp/graphics/cshader.cpp
@@ -498,7 +488,7 @@
../../src/eepp/graphics/cparticlesystem.cpp
../../src/eepp/graphics/cparticle.cpp
../../src/eepp/graphics/cimage.cpp
../../src/eepp/graphics/cglobalshapegroup.cpp
../../src/eepp/graphics/cglobaltextureatlas.cpp
../../src/eepp/graphics/cglobalbatchrenderer.cpp
../../src/eepp/graphics/cframebufferpbuffer.cpp
../../src/eepp/graphics/cframebuffermanager.cpp
@@ -514,6 +504,69 @@
../../src/examples/empty_window/empty_window.cpp
../../src/test/eetest.hpp
../../src/test/eetest.cpp
../../src/eeiv/capp.hpp
../../src/eeiv/eeiv.cpp
../../src/eeiv/capp.cpp
../../src/eepp/graphics/renderer/shaders/primitive.vert
../../src/eepp/graphics/renderer/shaders/primitive.frag
../../src/eepp/graphics/renderer/shaders/pointsprite.vert
../../src/eepp/graphics/renderer/shaders/pointsprite.frag
../../src/eepp/graphics/renderer/shaders/clipped.vert
../../src/eepp/graphics/renderer/shaders/clipped.frag
../../src/eepp/graphics/renderer/shaders/base.vert
../../src/eepp/graphics/renderer/shaders/base.frag
../../src/eepp/graphics/renderer/crenderergles2.cpp
../../include/eepp/graphics/renderer/crenderergles2.hpp
../../include/eepp/ee.hpp
../../include/eepp/declares.hpp
../../include/eepp/base.hpp
../../src/eepp/graphics/renderer/shaders/basegl3.vert
../../src/eepp/graphics/renderer/shaders/basegl3.frag
../../src/examples/external_shader/external_shader.cpp
../../src/eepp/helper/haikuttf/sophist.h
../../src/eepp/helper/haikuttf/hkmutex.hpp
../../src/eepp/helper/haikuttf/hkglyph.hpp
../../src/eepp/helper/haikuttf/hkfontmanager.hpp
../../src/eepp/helper/haikuttf/hkfont.hpp
../../src/eepp/helper/haikuttf/hkbase.hpp
../../src/eepp/helper/haikuttf/haikuttf.hpp
../../src/eepp/helper/haikuttf/hkmutex.cpp
../../src/eepp/helper/haikuttf/hkglyph.cpp
../../src/eepp/helper/haikuttf/hkfontmanager.cpp
../../src/eepp/helper/haikuttf/hkfont.cpp
../../include/eepp/window.hpp
../../include/eepp/ui.hpp
../../include/eepp/system.hpp
../../include/eepp/physics.hpp
../../include/eepp/math.hpp
../../include/eepp/graphics.hpp
../../include/eepp/gaming.hpp
../../include/eepp/ee.hpp
../../include/eepp/declares.hpp
../../include/eepp/base.hpp
../../include/eepp/audio.hpp
../../src/eepp/window/backend/SFML/cwindowsfml.hpp
../../src/eepp/window/backend/SFML/cjoysticksfml.hpp
../../src/eepp/window/backend/SFML/cjoystickmanagersfml.hpp
../../src/eepp/window/backend/SFML/cinputsfml.hpp
../../src/eepp/window/backend/SFML/ccursorsfml.hpp
../../src/eepp/window/backend/SFML/ccursormanagersfml.hpp
../../src/eepp/window/backend/SFML/cclipboardsfml.hpp
../../src/eepp/window/backend/SFML/cbackendsfml.hpp
../../src/eepp/window/backend/SFML/cwindowsfml.cpp
../../src/eepp/window/backend/SFML/cjoysticksfml.cpp
../../src/eepp/window/backend/SFML/cjoystickmanagersfml.cpp
../../src/eepp/window/backend/SFML/cinputsfml.cpp
../../src/eepp/window/backend/SFML/ccursorsfml.cpp
../../src/eepp/window/backend/SFML/ccursormanagersfml.cpp
../../src/eepp/window/backend/SFML/cclipboardsfml.cpp
../../src/eepp/window/cbackend.hpp
../../src/eepp/graphics/cframebufferpbuffer.hpp
../../src/eepp/graphics/cframebufferfbo.hpp
../../src/eepp/graphics/renderer/rendererhelper.hpp
../../include/eepp/graphics/packerhelper.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl.cpp
../../include/eepp/system/filesystem.hpp
../../src/eepp/system/filesystem.cpp
../../include/eepp/graphics/glhelper.hpp
../../include/eepp/window/windowhandle.hpp
../../include/eepp/window/windowcontext.hpp
../../include/eepp/version.hpp
../../src/eepp/base/version.cpp

View File

@@ -406,8 +406,10 @@ void cTextureLoader::LoadFromPixels() {
mPixels = NULL;
} else
cLog::instance()->Write( stbi_failure_reason() );
} else {
if ( NULL != stbi_failure_reason() )
cLog::instance()->Write( stbi_failure_reason() );
}
SetLoaded();
}

View File

@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#define JPGE_MAX(a,b) (((a)>(b))?(a):(b))
#define JPGE_MIN(a,b) (((a)<(b))?(a):(b))