From e5a33a8d4a381fd7ed2f3c2ad2e4b20670a58e2d Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 28 Mar 2023 21:40:30 +0530 Subject: [PATCH] Check if passing arguments with cmake work --- android/CMakeLists.txt | 7 +++++++ android/build.gradle | 1 + 2 files changed, 8 insertions(+) diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 1ce5f0e..8f92f73 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -1,5 +1,12 @@ cmake_minimum_required(VERSION 3.6) project(flutter_openssl_crypto) find_package(OpenSSL REQUIRED) +if(OPENSSL_FOUND) + message("OpenSSL found:") + message(" Includes: ${OPENSSL_INCLUDE_DIR}") + message(" Libraries: ${OPENSSL_CRYPTO_LIBRARY}") +else() + message(FATAL_ERROR "OpenSSL not found") +endif() add_library(${PROJECT_NAME} SHARED empty.c) target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::Crypto) diff --git a/android/build.gradle b/android/build.gradle index f3e2727..4b797ab 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,6 +36,7 @@ android { externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared" + arguments "-DOPENSSL_ROOT_DIR=/usr/lib/openssl-1.1", "-DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.1/libcrypto.so", "-DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.1/openssl" } } }