FindOpenSSL: OpenSSL 3.0.12 distributed by Qt is no longer found on Windows
Following CMakeLists.txt does not find OpenSSL v 3.0 installed as a part of Qt 6 distribution on Windows. Previous versions (as new as 3.27.9) were tested do find the library successfully.
cmake_minimum_required(VERSION 3.23)
project(openssl-regression)
find_package(OpenSSL 3.0.12 REQUIRED COMPONENTS SSL Crypto)
Reproduction steps:
- Install Qt6.5.3 LTS (possibly other versions as well), in the Maintenance tool be sure to enable
Qt > Developer and Designer Tools > OpenSSL 3.0.12 Toolkit
. - Add OpenSSL into PATH environment variable (C:\Qt\Tools\OpenSSLv3\Win_x64\bin)
- Run
cmake -GNinja /path/to/cmakelists.txt
CMake will report that OpenSSL was not found.
This seems to be a regression introduced either by fix for #25856 (closed) or #25702 (closed).