diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6904952..e915144 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,11 +16,12 @@ jobs: os: [ubuntu, windows, macos] arch: [x64, arm64] include: - # https://github.com/MaaAssistantArknights/MaaDeps/issues/20 - # - os: ubuntu - # arch: arm64-android + - os: ubuntu + arch: arm64-android - os: ubuntu arch: arm-android + - os: ubuntu + arch: arm-neon-android # clang-17: error: unsupported argument 'i686' to option '-march=' # https://github.com/MaaAssistantArknights/MaaDeps/actions/runs/7285060481/job/19851366697 # - os: ubuntu @@ -79,7 +80,6 @@ jobs: if: contains(matrix.arch, 'android') run: | git -C vcpkg apply ../vcpkg-overlay/scripts/remove_avoid-version.patch - - name: Install Packages on MacOS if: runner.os == 'macOS' diff --git a/vcpkg-overlay/triplets/maa-arm-android.cmake b/vcpkg-overlay/triplets/maa-arm-android.cmake index 4499b5f..731aa28 100644 --- a/vcpkg-overlay/triplets/maa-arm-android.cmake +++ b/vcpkg-overlay/triplets/maa-arm-android.cmake @@ -3,10 +3,11 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_CMAKE_SYSTEM_NAME Android) set(VCPKG_CMAKE_SYSTEM_VERSION 23) set(VCPKG_BUILD_TYPE release) -set(VCPKG_MAKE_BUILD_TRIPLET "--host=arm-linux-android") -set(VCPKG_TARGET_TRIPLET arm-android) -set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s") +set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} + -DANDROID_ABI=armeabi-v7a + -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s") include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake) diff --git a/vcpkg-overlay/triplets/maa-x64-android.cmake b/vcpkg-overlay/triplets/maa-arm-neon-android.cmake similarity index 57% rename from vcpkg-overlay/triplets/maa-x64-android.cmake rename to vcpkg-overlay/triplets/maa-arm-neon-android.cmake index 487df73..f34faa5 100644 --- a/vcpkg-overlay/triplets/maa-x64-android.cmake +++ b/vcpkg-overlay/triplets/maa-arm-neon-android.cmake @@ -1,11 +1,13 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_TARGET_ARCHITECTURE arm) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_CMAKE_SYSTEM_NAME Android) set(VCPKG_CMAKE_SYSTEM_VERSION 23) set(VCPKG_BUILD_TYPE release) -set(VCPKG_MAKE_BUILD_TRIPLET "--host=x86_64-linux-android") -set(VCPKG_TARGET_TRIPLET x64-android) -set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF) +set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} + -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=ON + -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s") include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake) diff --git a/vcpkg-overlay/triplets/maa-arm64-android.cmake b/vcpkg-overlay/triplets/maa-arm64-android.cmake index 962d2bb..fc36712 100644 --- a/vcpkg-overlay/triplets/maa-arm64-android.cmake +++ b/vcpkg-overlay/triplets/maa-arm64-android.cmake @@ -4,9 +4,10 @@ set(VCPKG_CMAKE_SYSTEM_NAME Android) set(VCPKG_CMAKE_SYSTEM_VERSION 23) set(VCPKG_BUILD_TYPE release) set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-linux-android") -set(VCPKG_TARGET_TRIPLET arm64-android) -set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} + -DANDROID_ABI=arm64-v8a + -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-s") include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake) diff --git a/vcpkg-overlay/triplets/maa-x86-android.cmake b/vcpkg-overlay/triplets/maa-x86-android.cmake deleted file mode 100644 index 79f4902..0000000 --- a/vcpkg-overlay/triplets/maa-x86-android.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_CMAKE_SYSTEM_NAME Android) -set(VCPKG_CMAKE_SYSTEM_VERSION 23) -set(VCPKG_BUILD_TYPE release) -set(VCPKG_MAKE_BUILD_TRIPLET "--host=x86-linux-android") -set(VCPKG_TARGET_TRIPLET x86-android) -set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF) - -include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/maa-android-library-override.cmake)