Move to OpenSSLv3 (& Drop 32-bit) (#4883)
This commit is contained in:
parent
0deb037035
commit
b0470ab678
6 changed files with 15 additions and 94 deletions
12
.github/workflows/desktop-build.yml
vendored
12
.github/workflows/desktop-build.yml
vendored
|
@ -302,21 +302,13 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: Win-32bit
|
|
||||||
bit: 32
|
|
||||||
arch: x86
|
|
||||||
cmake_generator_platform: Win32
|
|
||||||
qt_version: 5.15.*
|
|
||||||
qt_arch: msvc2019
|
|
||||||
qt_tools: "tools_openssl_x86"
|
|
||||||
|
|
||||||
- target: Win7+-64bit
|
- target: Win7+-64bit
|
||||||
bit: 64
|
bit: 64
|
||||||
arch: x64
|
arch: x64
|
||||||
cmake_generator_platform: x64
|
cmake_generator_platform: x64
|
||||||
qt_version: 5.15.*
|
qt_version: 5.15.*
|
||||||
qt_arch: msvc2019_64
|
qt_arch: msvc2019_64
|
||||||
qt_tools: "tools_openssl_x64"
|
qt_tools: "tools_opensslv3_x64"
|
||||||
|
|
||||||
- target: Win10+-64bit
|
- target: Win10+-64bit
|
||||||
bit: 64
|
bit: 64
|
||||||
|
@ -324,7 +316,7 @@ jobs:
|
||||||
cmake_generator_platform: x64
|
cmake_generator_platform: x64
|
||||||
qt_version: 6.3.*
|
qt_version: 6.3.*
|
||||||
qt_arch: msvc2019_64
|
qt_arch: msvc2019_64
|
||||||
qt_tools: "tools_openssl_x64"
|
qt_tools: "tools_opensslv3_x64"
|
||||||
qt_modules: "qtmultimedia qtwebsockets"
|
qt_modules: "qtmultimedia qtwebsockets"
|
||||||
|
|
||||||
name: ${{matrix.target}}
|
name: ${{matrix.target}}
|
||||||
|
|
|
@ -225,7 +225,16 @@ endif()
|
||||||
|
|
||||||
#Find OpenSSL
|
#Find OpenSSL
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
find_package(Win32SslRuntime)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
if(OPENSSL_FOUND)
|
||||||
|
include_directories(${OPENSSL_INCLUDE_DIRS})
|
||||||
|
message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
|
||||||
|
else()
|
||||||
|
message(
|
||||||
|
WARNING
|
||||||
|
"Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime."
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Find VCredist
|
#Find VCredist
|
||||||
|
|
|
@ -112,7 +112,6 @@ The following flags can be passed to `cmake`:
|
||||||
- `-DUPDATE_TRANSLATIONS=1` Configure `make` to update the translation .ts files for new strings in the source code. Note: Running `make clean` will remove the .ts files (default 0 = no).
|
- `-DUPDATE_TRANSLATIONS=1` Configure `make` to update the translation .ts files for new strings in the source code. Note: Running `make clean` will remove the .ts files (default 0 = no).
|
||||||
- `-DTEST=1` Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests: ```make test```.
|
- `-DTEST=1` Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests: ```make test```.
|
||||||
- `-DFORCE_USE_QT5=1` Skip looking for Qt6 before trying to find Qt5
|
- `-DFORCE_USE_QT5=1` Skip looking for Qt6 before trying to find Qt5
|
||||||
- `-DOPEN_SSL_PATH=C:/Path/To/Tools/OpenSSL/Win_x64/bin"` Designate the OpenSSL Path if you're using non-standard directives
|
|
||||||
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
|
|
|
@ -10,7 +10,7 @@ if(WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# VS 2017 uses vcredist_ARCH.exe, VS 2022 uses vc_redist.ARCH.exe
|
# VS 2017 uses vcredist_ARCH.exe, VS 2022 uses vc_redist.ARCH.exe
|
||||||
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
|
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vcredist.${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
|
||||||
|
|
||||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||||
include(InstallRequiredSystemLibraries)
|
include(InstallRequiredSystemLibraries)
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
# Find the OpenSSL runtime libraries (.dll) for Windows that
|
|
||||||
# will be needed by Qt in order to access https urls.
|
|
||||||
if(NOT DEFINED WIN32 OR NOT ${WIN32})
|
|
||||||
message(STATUS "Non-Windows device trying to execute FindWin32SslRuntime, skipping")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
|
||||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
|
||||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
|
||||||
set(_OPENSSL_ROOT_PATHS
|
|
||||||
${OPEN_SSL_PATH}
|
|
||||||
"$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin"
|
|
||||||
"C:/OpenSSL-Win64/bin"
|
|
||||||
"C:/OpenSSL-Win64"
|
|
||||||
"C:/Tools/vcpkg/installed/x64-windows/bin"
|
|
||||||
"${_programfiles}/OpenSSL-Win64"
|
|
||||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x64/bin"
|
|
||||||
)
|
|
||||||
unset(_programfiles)
|
|
||||||
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
|
||||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
|
||||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
|
||||||
set(_OPENSSL_ROOT_PATHS
|
|
||||||
${OPEN_SSL_PATH}
|
|
||||||
"$ENV{VCPKG_PACKAGES_DIR}/x86-windows/bin"
|
|
||||||
"C:/OpenSSL-Win32/bin"
|
|
||||||
"C:/OpenSSL-Win32"
|
|
||||||
"C:/OpenSSL"
|
|
||||||
"C:/Tools/vcpkg/installed/x86-windows/bin"
|
|
||||||
"${_programfiles}/OpenSSL"
|
|
||||||
"${_programfiles}/OpenSSL-Win32"
|
|
||||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x86/bin"
|
|
||||||
)
|
|
||||||
unset(_programfiles)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Looking for OpenSSL @ ${CMAKE_GENERATOR_PLATFORM} in ${_OPENSSL_ROOT_PATHS}")
|
|
||||||
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_LIBEAY
|
|
||||||
NAMES libcrypto-1_1-x64.dll libcrypto.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_SSLEAY
|
|
||||||
NAMES libssl-1_1-x64.dll libssl.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_LIBEAY
|
|
||||||
NAMES libcrypto-1_1.dll libcrypto.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_SSLEAY
|
|
||||||
NAMES libssl-1_1.dll libssl.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32SSLRUNTIME_LIBEAY AND WIN32SSLRUNTIME_SSLEAY)
|
|
||||||
set(WIN32SSLRUNTIME_LIBRARIES "${WIN32SSLRUNTIME_LIBEAY}" "${WIN32SSLRUNTIME_SSLEAY}")
|
|
||||||
set(WIN32SSLRUNTIME_FOUND "YES")
|
|
||||||
message(STATUS "Found OpenSSL ${WIN32SSLRUNTIME_LIBRARIES}")
|
|
||||||
else()
|
|
||||||
set(WIN32SSLRUNTIME_FOUND "NO")
|
|
||||||
message(
|
|
||||||
WARNING
|
|
||||||
"Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
mark_as_advanced(WIN32SSLRUNTIME_LIBEAY WIN32SSLRUNTIME_SSLEAY)
|
|
|
@ -357,8 +357,8 @@ Data = Resources\")
|
||||||
COMPONENT Runtime
|
COMPONENT Runtime
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32SSLRUNTIME_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
install(FILES ${WIN32SSLRUNTIME_LIBRARIES} DESTINATION ./)
|
install(FILES ${OPENSSL_INCLUDE_DIRS} DESTINATION ./)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue