WellKnownTypesExtras: Allow .proto lookup outside CMAKE_FIND_ROOT_PATH


Cross-compilation toolchains commonly set
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE to ONLY (e.g. the QNX toolchain
files), which re-roots every find_path candidate under the sysroot and
hides host-side .proto files even when protobuf_ROOT or
CMAKE_PREFIX_PATH points at them. Pass CMAKE_FIND_ROOT_PATH_BOTH to the
find_path call to also search the unprefixed paths, matching the
build-time behavior in Qt6ProtobufWellKnownTypesBuildInternals.cmake.

Fixes: QTBUG-146735
Change-Id: I0d41b085828c6af305c965d32f93da56c919869f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit3cc32d58e3c6a00176e9c99ba88426238b0a23b7
parenta884ef32a51da77ff2ce45646c71d626a0702e7a
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeWed, 27 May 2026 13:29:54 +0000