File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ cfg_default_gcc_version=4.9
9
9
cfg_arm_alias_folder_name =" armeabi"
10
10
cfg_armv7_alias_folder_name =" armeabi-v7a"
11
11
cfg_arm64_alias_folder_name =" armeabi-v8a"
12
-
12
+ # specific the STL version, currently only clang and gnu is supported
13
+ cfg_default_build_stl =" gnu" # clang is another option
13
14
14
15
# build machine & build host
15
16
cfg_build_machine =" x86_64-apple-darwin14"
@@ -30,7 +31,7 @@ cfg_armv7_toolchain_bin="${ANDROID_NDK}/toolchains/arm-linux-androideabi-${cfg_d
30
31
# build arches and build libraries
31
32
cfg_all_supported_arches =(" arm" " armv7" " x86" " arm64" )
32
33
cfg_all_supported_libraries =(" png" " zlib" " lua" " luajit" " websockets" " curl" " freetype" " jpeg" " tiff" " webp" " chipmunk" " openssl" " gafplayer" )
33
- cfg_default_arches_all =(" arm" " armv7" " x86" " arm64 " )
34
+ cfg_default_arches_all =(" arm" " armv7" " x86" )
34
35
cfg_default_libraries_all =(" png" " zlib" " lua" " luajit" " websockets" " curl" " freetype" " jpeg" " tiff" " webp" " chipmunk" " openssl" " gafplayer" )
35
36
36
37
Original file line number Diff line number Diff line change 315
315
fi
316
316
317
317
export ANDROID_USE_MTHUMB=$use_mthumb
318
+ export ANDROID_STL_VERSION=$cfg_default_build_stl
318
319
319
320
install_library_path=" install-${cfg_platform_name} "
320
321
build_library_path=$cfg_platform_name
Original file line number Diff line number Diff line change @@ -279,6 +279,13 @@ check_android_sdk()
279
279
add_make_enabled " HAVE_x86"
280
280
add_make " EXTRA_CFLAGS := -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fomit-frame-pointer -fstrict-aliasing -DANDROID -Wa,--noexecstack -Wformat "
281
281
fi
282
+
283
+ if [ ${ANDROID_STL_VERSION} = " gnu" ]; then
284
+ add_make_enabled " HAVE_STL_GUN"
285
+ else
286
+ add_make_enabled " HAVE_STL_CLANG"
287
+ fi
288
+
282
289
}
283
290
284
291
check_tizen_sdk ()
Original file line number Diff line number Diff line change @@ -30,9 +30,11 @@ ifdef HAVE_ANDROID
30
30
CMAKE_DEFINE =ANDROID
31
31
endif
32
32
33
+ ifndef HAVE_CROSS_COMPILE
33
34
ifdef HAVE_LINUX
34
35
CMAKE_DEFINE =LINUX
35
36
endif
37
+ endif
36
38
37
39
.gafplayer : gafplayer toolchain.cmake
38
40
cd $< /Library && $(HOSTVARS ) CFLAGS=" $( CFLAGS) $( EX_ECFLAGS) " ${CMAKE} -D${CMAKE_DEFINE} =1
Original file line number Diff line number Diff line change @@ -419,9 +419,18 @@ ifdef HAVE_ANDROID
419
419
echo "set(CMAKE_SYSTEM_NAME Linux)" >> $@
420
420
echo "set(CMAKE_CXX_SYSROOT_FLAG \"\")" >> $@
421
421
echo "set(CMAKE_C_SYSROOT_FLAG \"\")" >> $@
422
+ ifdef HAVE_STL_GUN
423
+ echo "include_directories($(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include \
424
+ $(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(MY_TARGET_ARCH)/include \
425
+ $(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward)" >> $@
426
+ endif
427
+ ifdef HAVE_STL_CLANG
422
428
echo "include_directories($(ANDROID_NDK)/sources/android/support/include \
423
- $(ANDROID_NDK)/sources/cxx-stl/llvm-libc++/libcxx/include)" >> $@
429
+ $(ANDROID_NDK)/sources/cxx-stl/llvm-libc++/libcxx/include)" >> $@
424
430
endif
431
+
432
+ endif # end of HAVE_ANDROID
433
+
425
434
ifdef HAVE_TIZEN
426
435
echo "set(CMAKE_SYSTEM_NAME Linux)" >> $@
427
436
endif
You can’t perform that action at this time.
0 commit comments