From d57017cf5533c9d1842db326a8317b2b2d6e6596 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 6 Sep 2024 15:24:52 +0800 Subject: [PATCH] fix: structure android --- .github/workflows/build.yml | 8 +----- .../maa-android-library-override.cmake | 20 +++++++------- .../triplets/maa-arm-neon-android.cmake | 13 ---------- ...rm-android.cmake => maa-x64-android.cmake} | 26 +++++++++---------- 4 files changed, 24 insertions(+), 43 deletions(-) delete mode 100644 vcpkg-overlay/triplets/maa-arm-neon-android.cmake rename vcpkg-overlay/triplets/{maa-arm-android.cmake => maa-x64-android.cmake} (74%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba9fa0a..483aa45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,13 +19,7 @@ jobs: - 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 - # arch: x64-android + arch: x64-android fail-fast: false defaults: run: diff --git a/vcpkg-overlay/triplets/maa-android-library-override.cmake b/vcpkg-overlay/triplets/maa-android-library-override.cmake index 4796fcd..4e56623 100644 --- a/vcpkg-overlay/triplets/maa-android-library-override.cmake +++ b/vcpkg-overlay/triplets/maa-android-library-override.cmake @@ -1,10 +1,10 @@ -if(PORT MATCHES "onnxruntime") - message("add -Wno-error=shorten-64-to-32 for ${PORT}") - string(APPEND VCPKG_C_FLAGS "-Wno-error=shorten-64-to-32") - string(APPEND VCPKG_CXX_FLAGS "-Wno-error=shorten-64-to-32") -endif() -if (PORT MATCHES "curl") - message("add -Wno-error=implicit-function-declaration for ${PORT}") - string(APPEND VCPKG_C_FLAGS "-Wno-error=implicit-function-declaration") - string(APPEND VCPKG_CXX_FLAGS "-Wno-error=implicit-function-declaration") -endif() +# if(PORT MATCHES "onnxruntime") +# message("add -Wno-error=shorten-64-to-32 for ${PORT}") +# string(APPEND VCPKG_C_FLAGS "-Wno-error=shorten-64-to-32") +# string(APPEND VCPKG_CXX_FLAGS "-Wno-error=shorten-64-to-32") +# endif() +# if (PORT MATCHES "curl") +# message("add -Wno-error=implicit-function-declaration for ${PORT}") +# string(APPEND VCPKG_C_FLAGS "-Wno-error=implicit-function-declaration") +# string(APPEND VCPKG_CXX_FLAGS "-Wno-error=implicit-function-declaration") +# endif() diff --git a/vcpkg-overlay/triplets/maa-arm-neon-android.cmake b/vcpkg-overlay/triplets/maa-arm-neon-android.cmake deleted file mode 100644 index f34faa5..0000000 --- a/vcpkg-overlay/triplets/maa-arm-neon-android.cmake +++ /dev/null @@ -1,13 +0,0 @@ -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=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-arm-android.cmake b/vcpkg-overlay/triplets/maa-x64-android.cmake similarity index 74% rename from vcpkg-overlay/triplets/maa-arm-android.cmake rename to vcpkg-overlay/triplets/maa-x64-android.cmake index 731aa28..5d53887 100644 --- a/vcpkg-overlay/triplets/maa-arm-android.cmake +++ b/vcpkg-overlay/triplets/maa-x64-android.cmake @@ -1,13 +1,13 @@ -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=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) +set(VCPKG_TARGET_ARCHITECTURE x64) +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=x64-linux-android") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS} + -DANDROID_ABI=x86_64 + -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)