I am trying to use CPR in android. This is my src/main/cpp
directory's structure:
cpr/
native-lib.cpp
CMakeLists.txt
note: cpr/ directory is generated by running this command git clone --recurse-submodules https://github.com/whoshuu/cpr.git
And this is the content of CMakeLists.txt
in src/main/cpp
directory:
cmake_minimum_required(VERSION 3.4.1)
add_library(
native-lib
SHARED
native-lib.cpp
)
find_library(
log-lib
log
)
add_subdirectory(cpr)
target_link_libraries(
native-lib
cpr
${log-lib}
)
But I get this error when I build and run the code:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)