From 2b7af8e999c8d023b875026cc2899c1ffe5658a8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 21 Sep 2019 11:19:10 +0300 Subject: [PATCH] Fix testing Qt version for OpenSSL. --HG-- branch : develop --- common.pri | 31 +++++++++++++++++++++++-------- src/app/valentina/valentina.pro | 31 +++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/common.pri b/common.pri index 4896b1fde..bf4b152ab 100644 --- a/common.pri +++ b/common.pri @@ -70,16 +70,31 @@ macx{ # Our solution was to distribute the OpenSSL DLLs along with our application (~1.65 MB). The alternative is to compile # Qt from scratch without OpenSSL support. win32 { - greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 11):greaterThan(QT_PATCH_VERSION, 3) { - # Minimal supported OpenSSL version since Qt 5.12.4 is 1.1.1. - contains(QMAKE_HOST.arch, x86_64) { - INSTALL_OPENSSL += \ - ../../../dist/win/openssl/win64/libcrypto-1_1-x64.dll \ - ../../../dist/win/openssl/win64/libssl-1_1-x64.dll + greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 10) { + versionAtLeast(QT_VERSION, 5.12.4){ + # Minimal supported OpenSSL version since Qt 5.12.4 is 1.1.1. + contains(QMAKE_HOST.arch, x86_64) { + INSTALL_OPENSSL += \ + ../../../dist/win/openssl/win64/libcrypto-1_1-x64.dll \ + ../../../dist/win/openssl/win64/libssl-1_1-x64.dll + } else { + INSTALL_OPENSSL += \ + ../../../dist/win/openssl/win32/libcrypto-1_1.dll \ + ../../../dist/win/openssl/win32/libssl-1_1.dll + } } else { INSTALL_OPENSSL += \ - ../../../dist/win/openssl/win32/libcrypto-1_1.dll \ - ../../../dist/win/openssl/win32/libssl-1_1.dll + ../../../dist/win/msvcr120.dll + + contains(QMAKE_HOST.arch, x86_64) { + INSTALL_OPENSSL += \ + ../../../dist/win/openssl/win64/libeay32.dll \ + ../../../dist/win/openssl/win64/ssleay32.dll + } else { + INSTALL_OPENSSL += \ + ../../../dist/win/openssl/win32/libeay32.dll \ + ../../../dist/win/openssl/win32/ssleay32.dll + } } } else { INSTALL_OPENSSL += \ diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 7755826a1..222b885d7 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -369,16 +369,31 @@ win32:*g++* { package.files += $$[QT_INSTALL_BINS]/Qt5WinExtras.dll } - greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 11):greaterThan(QT_PATCH_VERSION, 3) { - # Minimal supported OpenSSL version since Qt 5.12.4 is 1.1.1. - contains(QMAKE_HOST.arch, x86_64) { - package.files += \ - $$PWD/../../../dist/win/openssl/win64/libcrypto-1_1-x64.dll \ - $$PWD/../../../dist/win/openssl/win64/libssl-1_1-x64.dll + greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 10) { + versionAtLeast(QT_VERSION, 5.12.4){ + # Minimal supported OpenSSL version since Qt 5.12.4 is 1.1.1. + contains(QMAKE_HOST.arch, x86_64) { + package.files += \ + $$PWD/../../../dist/win/openssl/win64/libcrypto-1_1-x64.dll \ + $$PWD/../../../dist/win/openssl/win64/libssl-1_1-x64.dll + } else { + package.files += \ + $$PWD/../../../dist/win/openssl/win32/libcrypto-1_1.dll \ + $$PWD/../../../dist/win/openssl/win32/libssl-1_1.dll + } } else { package.files += \ - $$PWD/../../../dist/win/openssl/win32/libcrypto-1_1.dll \ - $$PWD/../../../dist/win/openssl/win32/libssl-1_1.dll + $$PWD/../../../dist/win/msvcr120.dll \ + + contains(QMAKE_HOST.arch, x86_64) { + package.files += \ + $$PWD/../../../dist/win/openssl/win64/libeay32.dll \ + $$PWD/../../../dist/win/openssl/win64/ssleay32.dll + } else { + package.files += \ + $$PWD/../../../dist/win/openssl/win32/libeay32.dll \ + $$PWD/../../../dist/win/openssl/win32/ssleay32.dll + } } } else { package.files += \