Skip to content

Commit e93f18c

Browse files
committed
add android ndk stl include directory
1 parent 9a8f724 commit e93f18c

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

build/android.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ cfg_armv7_toolchain_bin="${ANDROID_NDK}/toolchains/arm-linux-androideabi-${cfg_d
2929

3030
#build arches and build libraries
3131
cfg_all_supported_arches=("arm" "armv7" "x86" "arm64")
32-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
32+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "gafplayer")
3333
cfg_default_arches_all=("arm" "armv7" "x86" "arm64")
34-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
34+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "gafplayer")
3535

3636

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

build/ios.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ cfg_armv7s_host_machine="arm-apple-darwin"
1414
cfg_arm64_host_machine="arm-apple-darwin"
1515

1616
cfg_all_supported_arches=("armv7" "armv7s" "i386" "arm64" "x86_64")
17-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
17+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "gafplayer")
1818
cfg_default_arches_all=("armv7" "armv7s" "i386" "arm64" "x86_64")
19-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
19+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "gafplayer")
2020

2121

2222
cfg_build_fat_library=yes

contrib/src/gafplayer/rules.mak

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
# gafplayer
22

3-
GAFPLYER_GITURL := [email protected]:andyque/Cocos2dxGAFPlayer.git
3+
GAFPLAYER_GITURL := [email protected]:andyque/Cocos2dxGAFPlayer.git
44

5-
ifdef HAVE_MACOSX
6-
PKGS += gafplyer
7-
endif
5+
PKGS += gafplayer
86

9-
$(TARBALLS)/gafplyer-git.tar.xz:
10-
$(call download_git,$(GAFPLYER_GITURL),addCMakeSupport)
7+
$(TARBALLS)/gafplayer-git.tar.xz:
8+
$(call download_git,$(GAFPLAYER_GITURL),addCMakeSupport)
119

1210

13-
.sum-gafplyer: gafplyer-git.tar.xz
11+
.sum-gafplayer: gafplayer-git.tar.xz
1412
$(warning $@ not implemented)
1513
touch $@
1614

17-
gafplyer: gafplyer-git.tar.xz .sum-gafplyer
15+
gafplayer: gafplayer-git.tar.xz .sum-gafplayer
1816
$(UNPACK)
1917
$(MOVE)
2018

@@ -24,9 +22,20 @@ endif
2422

2523
ifdef HAVE_MACOSX
2624
EX_ECFLAGS = -DMACOSX_DEPLOYMENT_TARGET=10.7
25+
CMAKE_DEFINE=MACOX
26+
endif
27+
28+
ifdef HAVE_IOS
29+
CMAKE_DEFINE=IOS
2730
endif
2831

29-
.gafplyer: gafplyer toolchain.cmake
30-
cd $</Library && $(HOSTVARS) CFLAGS="$(CFLAGS) $(EX_ECFLAGS)" ${CMAKE}
32+
ifdef HAVE_ANDROID
33+
CMAKE_DEFINE=ANDROID
34+
endif
35+
36+
37+
38+
.gafplayer: gafplayer toolchain.cmake
39+
cd $</Library && $(HOSTVARS) CFLAGS="$(CFLAGS) $(EX_ECFLAGS)" ${CMAKE} -D${CMAKE_DEFINE}=1
3140
cd $</Library && $(MAKE) VERBOSE=1 install
3241
touch $@

contrib/src/main.mak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ ifdef HAVE_ANDROID
419419
echo "set(CMAKE_SYSTEM_NAME Linux)" >> $@
420420
echo "set(CMAKE_CXX_SYSROOT_FLAG \"\")" >> $@
421421
echo "set(CMAKE_C_SYSROOT_FLAG \"\")" >> $@
422+
echo "include_directories($(ANDROID_NDK)/sources/android/support/include \
423+
$(ANDROID_NDK)/sources/cxx-stl/llvm-libc++/libcxx/include)" >> $@
422424
endif
423425
ifdef HAVE_TIZEN
424426
echo "set(CMAKE_SYSTEM_NAME Linux)" >> $@

0 commit comments

Comments
 (0)