Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #59 #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion android_openssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ function(add_android_openssl_libraries)
set(ssl_root_path ${CMAKE_CURRENT_FUNCTION_LIST_DIR})
endif()

if(Qt6_VERSION VERSION_GREATER_EQUAL 6.5.0)
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.5.0 OR (QT_VERSION VERSION_GREATER_EQUAL 5.15.8 AND QT_VERSION VERSION_LESS 6.0.0))
message("Using OpenSSL v3")
if(NOT OPENSSL_ROOT_DIR)
set(OPENSSL_ROOT_DIR ${SSL_ROOT_PATH}/ssl_3/${CMAKE_ANDROID_ARCH_ABI})
endif()
list(APPEND android_extra_libs
${ssl_root_path}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libcrypto_3.so
${ssl_root_path}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libssl_3.so)
else()
message(WARNING "Using OpenSSL v1.1, it was deprecated")
if(NOT OPENSSL_ROOT_DIR)
set(OPENSSL_ROOT_DIR ${SSL_ROOT_PATH}/ssl_1.1/${CMAKE_ANDROID_ARCH_ABI})
endif()
Expand Down
4 changes: 3 additions & 1 deletion openssl.pri
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
CONFIG(release, debug|release): SSL_PATH = $$PWD
else: SSL_PATH = $$PWD/no-asm

if (versionAtLeast(QT_VERSION, 6.5.0)) {
if (versionAtLeast(QT_VERSION, 6.5.0) | if(versionAtLeast(QT_VERSION, 5.15.8) : versionAtMost(QT_VERSION, 6.0.0))) {
message(Using OpenSSL v3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these prints are done only for qmake, either add to cmake also or remove them to keep things more consistent

ANDROID_EXTRA_LIBS += \
$$SSL_PATH/ssl_3/arm64-v8a/libcrypto_3.so \
$$SSL_PATH/ssl_3/arm64-v8a/libssl_3.so \
Expand All @@ -13,6 +14,7 @@
$$SSL_PATH/ssl_3/x86_64/libcrypto_3.so \
$$SSL_PATH/ssl_3/x86_64/libssl_3.so
} else {
warning("Using OpenSSL v1.1, it was deprecated")
ANDROID_EXTRA_LIBS += \
$$SSL_PATH/ssl_1.1/arm64-v8a/libcrypto_1_1.so \
$$SSL_PATH/ssl_1.1/arm64-v8a/libssl_1_1.so \
Expand Down