Compare commits

..

5 commits

Author SHA1 Message Date
PCoder
c273e17d5a Remove config 2023-03-28 23:15:07 +05:30
PCoder
8c9589dd01 Revert back config 2023-03-28 21:59:25 +05:30
PCoder
e5a33a8d4a Check if passing arguments with cmake work 2023-03-28 21:40:30 +05:30
PCoder
24fa209f53 Attempt without CONFIG and uppercase lib name 2023-03-28 18:49:26 +05:30
PCoder
cb9bdcb452 Test 1.1.1q 2023-03-28 17:44:25 +05:30
2 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,12 @@
cmake_minimum_required(VERSION 3.6) cmake_minimum_required(VERSION 3.6)
project(flutter_openssl_crypto) project(flutter_openssl_crypto)
find_package(openssl REQUIRED CONFIG) 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) add_library(${PROJECT_NAME} SHARED empty.c)
target_link_libraries(${PROJECT_NAME} PRIVATE openssl::crypto) target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::Crypto)

View file

@ -36,6 +36,7 @@ android {
externalNativeBuild { externalNativeBuild {
cmake { cmake {
arguments "-DANDROID_STL=c++_shared" 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"
} }
} }
} }