Skip to content

Commit

Permalink
Fixed OpenSSL for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Jul 5, 2024
1 parent 6267fe3 commit 05f33bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [Linux, Windows, OSX, Android, iOS]
target: [Android, iOS, OSX, Linux, Windows]
build_type: [Debug, Release]
include:
- target: Linux
Expand Down Expand Up @@ -41,8 +41,7 @@ jobs:
- name: Install Linux host dependencies
if: ${{ matrix.host == 'ubuntu-latest'}}
run: |
sudo apt install ccache -y
sudo apt install ninja-build -y
sudo apt install ccache ninja-build -y
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
- name: Install Windows host dependencies
Expand All @@ -53,7 +52,8 @@ jobs:
- name: Install Darwin host dependencies
if: ${{ matrix.host == 'macos-latest'}}
run: |
brew install ccache
brew install ccache ninja
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
- name: Add Darwin toolchain
run: rustup target add x86_64-apple-darwin
Expand All @@ -80,4 +80,4 @@ jobs:
run: cmake -S build/${{matrix.target}} -B build/${{matrix.target}}/${{matrix.build_type}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}

- name: Build project
run: cmake --build build/${{matrix.target}}/${{matrix.build_type}} --config ${{matrix.build_type}} --target wallet-core --verbose
run: cmake --build build/${{matrix.target}}/${{matrix.build_type}} --config ${{matrix.build_type}} -j
7 changes: 1 addition & 6 deletions build/Android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ if(NOT CMAKE_ANDROID_NDK)
endif()
endif()

if(NOT DEFINED ENV{ANDROID_TOOLCHAIN})
message(WARNING "ANDROID_TOOLCHAIN not set in the environment variables. Setting to ${ANDROID_TOOLCHAIN_ROOT}.")
set(ANDROID_TOOLCHAIN ${ANDROID_TOOLCHAIN_ROOT})
endif()

set(CMAKE_TOOLCHAIN_FILE "${CMAKE_ANDROID_NDK}/build/cmake/android.toolchain.cmake")

project(ANDROID_SHARED_THIRD_PARTY LANGUAGES C CXX)
Expand Down Expand Up @@ -122,7 +117,7 @@ ExternalProject_Add(openssl
PREFIX openssl
SOURCE_DIR "${THIRDPARTY_DIR}/openssl"
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Openssl-build/build.sh ${OPENSSL_VARIANT} --abi=${OPENSSL_ABI} --api-level=${ANDROID_NATIVE_API_LEVEL} --build-dir=${OPENSSL_ROOT_DIR} --env_path=$ENV{PATH} --env_android_ndk=${CMAKE_ANDROID_NDK} --env_android_toolchain=$ENV{ANDROID_TOOLCHAIN}
BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Openssl-build/build.sh ${OPENSSL_VARIANT} --abi=${OPENSSL_ABI} --api-level=${ANDROID_NATIVE_API_LEVEL} --build-dir=${OPENSSL_ROOT_DIR} --env_path=$ENV{PATH} --env_android_ndk=${CMAKE_ANDROID_NDK} --env_android_toolchain=${ANDROID_TOOLCHAIN_ROOT}/bin
BUILD_IN_SOURCE FALSE
INSTALL_COMMAND make install_dev
)
Expand Down

0 comments on commit 05f33bd

Please sign in to comment.