diff --git a/3rdParty/vcpkg_ports/toolchains/android.cmake b/3rdParty/vcpkg_ports/toolchains/android.cmake index 5b96116003..e9f0207d49 100644 --- a/3rdParty/vcpkg_ports/toolchains/android.cmake +++ b/3rdParty/vcpkg_ports/toolchains/android.cmake @@ -3,16 +3,18 @@ set(CMAKE_SYSTEM_NAME Android CACHE STRING "") set(ANDROID_TOOLCHAIN clang CACHE STRING "") set(ANDROID_NATIVE_API_LEVEL ${CMAKE_SYSTEM_VERSION} CACHE STRING "") set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "") - + if (VCPKG_TARGET_TRIPLET MATCHES "^arm64-android") set(ANDROID_ABI arm64-v8a CACHE STRING "") elseif(VCPKG_TARGET_TRIPLET MATCHES "^armv6-android") set(ANDROID_ABI armeabi CACHE STRING "") + set(ANDROID_ARM_MODE arm CACHE STRING "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^arm-neon-android") + set(ANDROID_ABI armeabi-v7a CACHE STRING "") + set(ANDROID_ARM_NEON ON CACHE BOOL "") elseif(VCPKG_TARGET_TRIPLET MATCHES "^arm-android") set(ANDROID_ABI armeabi-v7a CACHE STRING "") - if(DEFINED ENV{ANDROID_ARM_NEON}) - set(ANDROID_ARM_NEON $ENV{ANDROID_ARM_NEON} CACHE STRING "") - endif() + set(ANDROID_ARM_NEON OFF CACHE BOOL "") elseif(VCPKG_TARGET_TRIPLET MATCHES "^x64-android") set(ANDROID_ABI x86_64 CACHE STRING "") elseif(VCPKG_TARGET_TRIPLET MATCHES "^x86-android") @@ -20,13 +22,13 @@ elseif(VCPKG_TARGET_TRIPLET MATCHES "^x86-android") else() message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}") endif() - + if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(ANDROID_STL c++_shared CACHE STRING "") else() set(ANDROID_STL c++_static CACHE STRING "") endif() - + if(DEFINED ENV{ANDROID_NDK_HOME}) set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME}) else() @@ -36,13 +38,13 @@ else() set(ANDROID_NDK_HOME "$ENV{ProgramFiles\(x86\)}/Android/android-sdk/ndk-bundle") endif() endif() - + if(NOT EXISTS "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") message(FATAL_ERROR "Could not find android ndk. Searched at ${ANDROID_NDK_HOME}") endif() - + include("${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") - + if(NOT _VCPKG_ANDROID_TOOLCHAIN) set(_VCPKG_ANDROID_TOOLCHAIN 1) get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) @@ -53,7 +55,7 @@ if(NOT _VCPKG_ANDROID_TOOLCHAIN) string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${VCPKG_CXX_FLAGS_DEBUG} ") string(APPEND CMAKE_C_FLAGS_RELEASE " ${VCPKG_C_FLAGS_RELEASE} ") string(APPEND CMAKE_CXX_FLAGS_RELEASE " ${VCPKG_CXX_FLAGS_RELEASE} ") - + string(APPEND CMAKE_SHARED_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") string(APPEND CMAKE_EXE_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " ${VCPKG_LINKER_FLAGS_DEBUG} ") @@ -62,4 +64,3 @@ if(NOT _VCPKG_ANDROID_TOOLCHAIN) string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " ${VCPKG_LINKER_FLAGS_RELEASE} ") endif() endif() - diff --git a/3rdParty/vcpkg_ports/triplets/default/arm-android.cmake b/3rdParty/vcpkg_ports/triplets/default/arm-android.cmake index 6b9aa8acaf..ff01ef9a79 100644 --- a/3rdParty/vcpkg_ports/triplets/default/arm-android.cmake +++ b/3rdParty/vcpkg_ports/triplets/default/arm-android.cmake @@ -3,5 +3,4 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Android) set(VCPKG_CMAKE_SYSTEM_VERSION 16) -set(ENV{ANDROID_ARM_NEON} FALSE) set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../toolchains/android.cmake") diff --git a/3rdParty/vcpkg_ports/triplets/default/arm-android-neon.cmake b/3rdParty/vcpkg_ports/triplets/default/arm-neon-android.cmake similarity index 89% rename from 3rdParty/vcpkg_ports/triplets/default/arm-android-neon.cmake rename to 3rdParty/vcpkg_ports/triplets/default/arm-neon-android.cmake index fe3c05efcd..ff01ef9a79 100644 --- a/3rdParty/vcpkg_ports/triplets/default/arm-android-neon.cmake +++ b/3rdParty/vcpkg_ports/triplets/default/arm-neon-android.cmake @@ -3,5 +3,4 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Android) set(VCPKG_CMAKE_SYSTEM_VERSION 16) -set(ENV{ANDROID_ARM_NEON} TRUE) set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../toolchains/android.cmake") diff --git a/android/buildAndroidBOINC-CI.sh b/android/buildAndroidBOINC-CI.sh index 2d599cb710..8357c5b878 100755 --- a/android/buildAndroidBOINC-CI.sh +++ b/android/buildAndroidBOINC-CI.sh @@ -145,10 +145,6 @@ if [ "${silent}" = "yes" ]; then export STDOUT_TARGET="/dev/null" fi -if [ $arch = "armv6" ]; then - build_with_vcpkg="no" -fi - export NDK_FLAGFILE="$PREFIX/NDK-${NDK_VERSION}-${REV}_done" export NDK_ARMV6_FLAGFILE="$PREFIX/NDK-${NDK_ARMV6_VERSION}-armv6-${ARMV6_REV}_done" export NDK_ROOT=$BUILD_DIR/android-ndk-r${NDK_VERSION} @@ -249,7 +245,7 @@ packegesList() list_pkgs="$list_pkgs $1:arm-android" fi if [ $arch = "neon" ]; then - list_pkgs="$list_pkgs $1:arm-android-neon" + list_pkgs="$list_pkgs $1:arm-neon-android" fi if [ $arch = "arm64" ]; then list_pkgs="$list_pkgs $1:arm64-android" diff --git a/android/build_boinc_arm.sh b/android/build_boinc_arm.sh index 48ad1dfdf8..13eff12500 100755 --- a/android/build_boinc_arm.sh +++ b/android/build_boinc_arm.sh @@ -44,7 +44,6 @@ export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCL export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -D__ANDROID_API__=16" export LDFLAGS="$CONFIG_LDFLAGS -llog -fPIE -pie -latomic -static-libstdc++ -march=armv7-a -Wl,--fix-cortex-a8" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" -export PKG_CONFIG_SYSROOT_DIR="$TCSYSROOT" MAKE_FLAGS="" diff --git a/android/build_boinc_arm64.sh b/android/build_boinc_arm64.sh index 5f08d1aada..a68c570290 100755 --- a/android/build_boinc_arm64.sh +++ b/android/build_boinc_arm64.sh @@ -44,7 +44,6 @@ export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -DDECLARE_TIMEZONE -W export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE -D__ANDROID_API__=21" export LDFLAGS="$CONFIG_LDFLAGS -llog -fPIE -pie -latomic -static-libstdc++" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" -export PKG_CONFIG_SYSROOT_DIR="$TCSYSROOT" MAKE_FLAGS="" diff --git a/android/build_boinc_armv6.sh b/android/build_boinc_armv6.sh index e722a73181..a1d932bacf 100755 --- a/android/build_boinc_armv6.sh +++ b/android/build_boinc_armv6.sh @@ -43,7 +43,6 @@ export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCL export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE -march=armv6 -mfloat-abi=softfp -mfpu=vfp -D__ANDROID_API__=16 -DARMV6" export LDFLAGS="$CONFIG_LDFLAGS -L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie -latomic -static-libstdc++ -march=armv6" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" -export PKG_CONFIG_SYSROOT_DIR="$TCSYSROOT" # Prepare android toolchain and environment ./build_androidtc_armv6.sh diff --git a/android/build_boinc_x86.sh b/android/build_boinc_x86.sh index 78cdc93e4d..bb586bc30f 100755 --- a/android/build_boinc_x86.sh +++ b/android/build_boinc_x86.sh @@ -44,7 +44,6 @@ export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCL export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE -D__ANDROID_API__=16" export LDFLAGS="$CONFIG_LDFLAGS -llog -fPIE -pie -latomic -static-libstdc++" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" -export PKG_CONFIG_SYSROOT_DIR="$TCSYSROOT" MAKE_FLAGS="" diff --git a/android/build_boinc_x86_64.sh b/android/build_boinc_x86_64.sh index 0ee9d994f1..d04be30720 100755 --- a/android/build_boinc_x86_64.sh +++ b/android/build_boinc_x86_64.sh @@ -44,7 +44,6 @@ export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -DDECLARE_TIMEZONE -W export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -DANDROID_64 -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE -D__ANDROID_API__=21" export LDFLAGS="$CONFIG_LDFLAGS -llog -fPIE -pie -latomic -static-libstdc++" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" -export PKG_CONFIG_SYSROOT_DIR="$TCSYSROOT" MAKE_FLAGS=""