Providing protobuf and gRPC support for Qt.
Go to file
Joerg Bornemann 363998806d CMake: Don't force CONFIG mode for finding the OpenSSL dependency
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>
2025-11-07 16:00:42 +01:00
LICENSES Add REUSE.toml files and missing licenses 2024-11-06 14:24:23 +01:00
cmake Point to 'protoc' installation guide when WrapProtoc is not found 2025-02-25 11:10:11 +01:00
coin Reapply "Enable the use of VCPKG for qtgrpc" 2025-09-17 11:28:04 +02:00
examples CMake: Don't force CONFIG mode for finding the OpenSSL dependency 2025-11-07 16:00:42 +01:00
src Doc: Add missing property docs 2025-11-06 12:46:42 +01:00
tests CMake: Don't force CONFIG mode for finding the OpenSSL dependency 2025-11-07 16:00:42 +01:00
.clang-format Adapt to reuse version 6 2025-10-20 09:40:45 +02:00
.cmake.conf QT_NO_AS_CONST: rename "QT_NO_AS_CONST" to "QT_NO_QASCONST" 2025-11-07 08:43:55 +01:00
.gitattributes Add missing .gitattributes and .tag files 2023-01-18 12:03:33 +02:00
.gitignore gitignore: add qmlls.ini files 2024-12-06 14:02:16 +01:00
.gitreview Add .gitreview file 2025-02-25 15:39:48 +01:00
.tag Add missing .gitattributes and .tag files 2023-01-18 12:03:33 +02:00
CMakeLists.txt Move `qt_internal_project_setup` as early as possible 2025-05-30 12:29:32 +02:00
LICENSE.Apache-2.0.txt Add REUSE.toml files and missing licenses 2024-11-06 14:24:23 +01:00
REUSE.toml Remove year from Qt Copyright in REUSE.toml 2025-07-14 09:47:17 +02:00
configure.cmake Long live qtprotobufgen 2022-11-08 10:33:39 +01:00
dependencies.yaml Update dependencies on 'dev' in qt/qtgrpc 2025-11-05 23:26:34 +00:00
licenseRule.json Update licensing of files with infrastructure type 2025-03-13 15:14:53 +01:00
qt_attribution.json CMake: Add PURL and CPE info to 3rd party attribution files 2025-06-04 14:03:57 +02:00
qt_cmdline.cmake Long live qtprotobufgen 2022-11-08 10:33:39 +01:00