diff --git a/ixcrypto/CMakeLists.txt b/ixcrypto/CMakeLists.txt index fd6896b7..000f8a6b 100644 --- a/ixcrypto/CMakeLists.txt +++ b/ixcrypto/CMakeLists.txt @@ -37,9 +37,7 @@ if (USE_MBED_TLS) target_include_directories(ixcrypto PUBLIC ${MBEDTLS_INCLUDE_DIRS}) target_link_libraries(ixcrypto ${MBEDTLS_LIBRARIES}) target_compile_definitions(ixcrypto PUBLIC IXCRYPTO_USE_MBED_TLS) -elseif (APPLE) -elseif (WIN32) -else() +elseif (USE_OPEN_SSL) find_package(OpenSSL REQUIRED) add_definitions(${OPENSSL_DEFINITIONS}) message(STATUS "OpenSSL: " ${OPENSSL_VERSION}) diff --git a/tools/build_android.sh b/tools/build_android.sh new file mode 100644 index 00000000..2b633291 --- /dev/null +++ b/tools/build_android.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# +# Executable : ${HOME}/Android/Sdk/cmake/3.6.3155560/bin/cmake +# arguments : +# -H${HOME}/Dev/github-projects/googlesamples/android-ndk/hello-jni/app/src/main/cpp +# -B${HOME}/Dev/github-projects/googlesamples/android-ndk/hello-jni/app/.cxx/cmake/arm7Debug/armeabi-v7a +# -GAndroid Gradle - Ninja +# -DANDROID_ABI=armeabi-v7a +# -DANDROID_NDK=${HOME}/Android/Sdk/ndk-bundle +# -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${HOME}/Dev/github-projects/googlesamples/android-ndk/hello-jni/app/build/intermediates/cmake/arm7/debug/obj/armeabi-v7a +# -DCMAKE_BUILD_TYPE=Debug +# -DCMAKE_MAKE_PROGRAM=${HOME}/Android/Sdk/cmake/3.6.3155560/bin/ninja +# -DCMAKE_TOOLCHAIN_FILE=${HOME}/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake +# -DANDROID_NATIVE_API_LEVEL=23 +# -DANDROID_TOOLCHAIN=clang +# jvmArgs : +# + +CMAKE_TOOLCHAIN_FILE=/tools/android/android-ndk-r20-darwin/build/cmake/android.toolchain.cmake +ANDROID_HOME=/tools/android/android-sdk-darwin +ANDROID_NDK=${ANDROID_HOME}/ndk-bundle +CMAKE_DIR=${ANDROID_HOME}/cmake/3.10.2.4988404/bin +CMAKE=${CMAKE_DIR}/cmake +NINJA=${CMAKE_DIR}/ninja + +${CMAKE} \ + .. \ + -DANDROID_NATIVE_API_LEVEL=23 \ + -DANDROID_ABI=armeabi-v7a \ + -DANDROID_TOOLCHAIN=clang \ + -DANDROID_NDK=${ANDROID_NDK} \ + -G'Unix Makefiles' \ + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ + -DCMAKE_MAKE_PROGRAM=make \ + -DUSE_WS=1