openssl from prefab (google) (#3429)

Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3429

Instead of downloading/patching/building openssl, use the prefab package prepared by Google.

changelog: Consume openssl from maven (prefab)

Reviewed By: passy

Differential Revision: D34143349

fbshipit-source-id: 0ca92be6628b1b27a59b3e4ad8278cf8fef6d5d8
This commit is contained in:
Lorenzo Blasa
2022-02-11 02:58:45 -08:00
committed by Facebook GitHub Bot
parent 9973014116
commit c8c40bca17
12 changed files with 35 additions and 118 deletions

View File

@@ -42,6 +42,7 @@ add_compile_options(-DFOLLY_NO_CONFIG
-Wno-tautological-constant-compare
)
find_package(openssl REQUIRED CONFIG)
file(GLOB SOURCES Flipper/*.cpp)
add_library(${PACKAGE_NAME} STATIC ${SOURCES})
@@ -70,7 +71,4 @@ target_include_directories(${PACKAGE_NAME} PRIVATE
${glog_DIR}/glog-0.3.5/src/
)
set(OPENSSL_LINK_DIRECTORIES ${external_DIR}/OpenSSL/libs/${ANDROID_ABI}/)
find_path(OPENSSL_LIBRARY libssl.a HINTS ${OPENSSL_LINK_DIRECTORIES})
target_link_libraries(${PACKAGE_NAME} folly rsocket glog double-conversion log event ${OPENSSL_LINK_DIRECTORIES}/libssl.a ${OPENSSL_LINK_DIRECTORIES}/libcrypto.a)
target_link_libraries(${PACKAGE_NAME} folly rsocket glog double-conversion log event openssl::ssl openssl::crypto)

View File

@@ -17,7 +17,7 @@ android {
targetSdkVersion rootProject.targetSdkVersion
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static'
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
}
}
}
@@ -33,10 +33,15 @@ android {
}
}
buildFeatures {
prefab true
}
dependencies {
implementation project(':third-party')
implementation project(':rsocket')
implementation project(':folly')
implementation deps.openssl
}
}