mirror of https://github.com/qt/qtgrpc.git
When CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE, find_package(OpenSSL) prefers CONFIG mode and may bypass package manager wrappers that only work in MODULE mode (e.g., vcpkg's wrapper). This can lead to finding the wrong OpenSSL installation, such as single-architecture system installations instead of the intended universal binaries from the package manager, causing linker errors when building for multiple architectures. Fix this by finding OpenSSL before setting CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE. This ensures OpenSSL is found via MODULE mode where package manager wrappers can properly control the search. When gRPC's config file is loaded, it skips its own OpenSSL search, using the already-found targets instead. For test files, backup and restore the original CMAKE_FIND_PACKAGE_PREFER_CONFIG value to limit the scope of the change. For example files, keep the change simple without the backup/restore pattern. Change-Id: I985560fd5d57fa8036cc2ccb93c01a55e2efe1bc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> |
||
|---|---|---|
| LICENSES | ||
| cmake | ||
| coin | ||
| examples | ||
| src | ||
| tests | ||
| .clang-format | ||
| .cmake.conf | ||
| .gitattributes | ||
| .gitignore | ||
| .gitreview | ||
| .tag | ||
| CMakeLists.txt | ||
| LICENSE.Apache-2.0.txt | ||
| REUSE.toml | ||
| configure.cmake | ||
| dependencies.yaml | ||
| licenseRule.json | ||
| qt_attribution.json | ||
| qt_cmdline.cmake | ||