Changes to build with XCode

This commit is contained in:
Martín Lucas Golini
2014-06-12 23:32:41 -03:00
parent 815aa4ddd3
commit 1faa754750
6 changed files with 17 additions and 10 deletions

View File

@@ -302,6 +302,7 @@ function build_base_configuration( package_name )
targetname ( package_name )
set_ios_config()
set_xcode_config()
end
function build_base_cpp_configuration( package_name )
@@ -310,6 +311,7 @@ function build_base_cpp_configuration( package_name )
end
set_ios_config()
set_xcode_config()
configuration "debug"
defines { "DEBUG" }
@@ -439,6 +441,7 @@ function build_link_configuration( package_name, use_ee_icon )
end
set_ios_config()
set_xcode_config()
end
function generate_os_links()
@@ -548,6 +551,14 @@ function add_sfml()
end
end
function set_xcode_config()
if is_xcode() then
linkoptions { "-F/Library/Frameworks" }
includedirs { "/Library/Frameworks/SDL2.framework/Headers" }
defines { "EE_SDL2_FROM_ROOTPATH" }
end
end
function set_ios_config()
if _OPTIONS.platform == "ios-arm7" or _OPTIONS.platform == "ios-x86" then
local err = false
@@ -589,11 +600,6 @@ function set_ios_config()
if _OPTIONS.platform == "ios-cross-arm7" or _OPTIONS.platform == "ios-cross-x86" then
includedirs { "src/eepp/helper/SDL2/include" }
end
if is_xcode() then
linkoptions { "-F/Library/Frameworks" }
includedirs { "/Library/Frameworks/SDL2.framework/Headers" }
end
end
function backend_is( name )
@@ -668,6 +674,7 @@ function build_eepp( build_name )
includedirs { "include", "src", "src/eepp/helper/freetype2/include", "src/eepp/helper/zlib" }
set_ios_config()
set_xcode_config()
add_static_links()

View File

@@ -3,7 +3,7 @@ cd $(dirname "$0")
/usr/local/bin/premake4 --file=../../premake4.lua --with-static-freetype --use-frameworks gmake
cd ../../make/macosx/
sed -e "s/-Wl,-x//g" -i .make *
sed -e "s/-Wl,-x//g" -i .make
make $@

View File

@@ -10,7 +10,7 @@
#define EE_BACKEND_SDL2
#endif
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC )
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC ) && !defined( EE_SDL2_FROM_ROOTPATH )
#include <SDL2/SDL.h>
#else
#include <SDL.h>

View File

@@ -2,7 +2,7 @@
#ifdef EE_BACKEND_SDL2
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC )
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC ) && !defined( EE_SDL2_FROM_ROOTPATH )
#include <SDL2/SDL.h>
#else
#include <SDL.h>

View File

@@ -2,7 +2,7 @@
#ifdef EE_BACKEND_SDL2
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC )
#if EE_PLATFORM != EE_PLATFORM_ANDROID && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_COMPILER_MSVC ) && !defined( EE_SDL2_FROM_ROOTPATH )
#include <SDL2/SDL_revision.h>
#else
#include <SDL_revision.h>

View File

@@ -3,7 +3,7 @@
#ifdef EE_BACKEND_SDL2
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS
#if !defined( EE_COMPILER_MSVC ) && EE_PLATFORM != EE_PLATFORM_IOS
#if !defined( EE_COMPILER_MSVC ) && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_SDL2_FROM_ROOTPATH )
#include <SDL2/SDL_syswm.h>
#else
#include <SDL_syswm.h>