Skip to content

Commit 9a8f724

Browse files
committed
add gafplayer
1 parent 30753d3 commit 9a8f724

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

build/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ function set_build_mode_cflags()
270270
export OPTIM
271271
}
272272

273+
if [ $cfg_platform_name = "mac" ];then
274+
export MIN_MACOSX_TARGET=$cfg_min_macosx_deoply_tartget
275+
fi
273276

274277

275278
# build all the libraries for different arches

build/mac.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ cfg_build_machine="x86_64-apple-darwin14"
1212
cfg_x86_64_host_machine="x86_64-apple-darwin"
1313
cfg_i386_host_machine="i386-apple-darwin"
1414

15+
cfg_min_macosx_deoply_tartget=10.7
16+
1517
#cross compile options
1618
cfg_is_cross_compile=no
1719
# cfg_armv7_toolchain_bin=
1820

1921
#build arches and build libraries
2022
cfg_all_supported_arches=("i386" "x86_64")
21-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl")
23+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl" "gafplayer")
2224
cfg_default_arches_all=("x86_64" "i386")
23-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl")
25+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl" "gafplayer")
2426

2527

2628
#whether build fat library, use lipo -S create

build/main.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ webp_header_files=webp
1414
websockets_header_files=libwebsockets.h
1515
zlib_header_files=z*.h
1616
chipmunk_header_files=chipmunk
17+
gafplayer_header_files=GAFPlayer
1718

1819

1920
##archive prebuilt name

contrib/src/gafplayer/rules.mak

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# gafplayer
2+
3+
GAFPLYER_GITURL := [email protected]:andyque/Cocos2dxGAFPlayer.git
4+
5+
ifdef HAVE_MACOSX
6+
PKGS += gafplyer
7+
endif
8+
9+
$(TARBALLS)/gafplyer-git.tar.xz:
10+
$(call download_git,$(GAFPLYER_GITURL),addCMakeSupport)
11+
12+
13+
.sum-gafplyer: gafplyer-git.tar.xz
14+
$(warning $@ not implemented)
15+
touch $@
16+
17+
gafplyer: gafplyer-git.tar.xz .sum-gafplyer
18+
$(UNPACK)
19+
$(MOVE)
20+
21+
ifdef HAVE_TIZEN
22+
EX_ECFLAGS = -fPIC
23+
endif
24+
25+
ifdef HAVE_MACOSX
26+
EX_ECFLAGS = -DMACOSX_DEPLOYMENT_TARGET=10.7
27+
endif
28+
29+
.gafplyer: gafplyer toolchain.cmake
30+
cd $</Library && $(HOSTVARS) CFLAGS="$(CFLAGS) $(EX_ECFLAGS)" ${CMAKE}
31+
cd $</Library && $(MAKE) VERBOSE=1 install
32+
touch $@

contrib/src/main.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CXX := ${HOST}-g++ --sysroot=$(TIZEN_SDK)/platforms/mobile-2.3/rootstraps/mobile
9999
endif
100100

101101
ifdef HAVE_MACOSX
102-
MIN_OSX_VERSION=10.6
102+
MIN_OSX_VERSION=${MIN_MACOSX_TARGET}
103103
CC=xcrun cc
104104
CXX=xcrun c++
105105
AR=xcrun ar

0 commit comments

Comments
 (0)