I want to import a prebuilt library using this CmakeLists.txt snippet:
add_library(openssl-crypto
SHARED
IMPORTED )
set_target_properties(openssl-crypto
PROPERTIES
IMPORTED_LOCATION
${external_DIR}/libs/${ANDROID_ABI}/libcrypto.so )
include_directories(${external_DIR}/include/openssl)
I linked this to my library as:
target_link_libraries(aes-crypto openssl-crypto)
Attempting to build returns this error:
'/libs/arm64-v8a/libcrypto.so', needed by ..., missing and no known rule to make it
add_dependencies(aes-crypto openssl-crypto)
Does that help? And how do you build openssl-crypto?add_dependencies
did not work. I used theadd_library(openssl-crypto SHARED IMPORTED)
to build the openssl-crypto libraryadd_library(jni-native-helper SHARED IMPORTED) set_target_properties(jni-native-helper PROPERTIES IMPORTED_LOCATION ../../../../src/main/cpp/external/libs/arm64-v8a/libnativehelper.so:)
,