From f10ff734362d5841d860905900e549f2c51153c0 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 5 Jun 2026 15:46:37 +0100 Subject: [PATCH] cmake: Skip `PATH` environment variable when discovering CapnProto On systems with UsrMerge, the `PATH` environment variable can cause CMake to produce include paths that contain root-level symlinks. The `capnp` compiler resolves paths lexically and fails to process them properly, resulting in a "no such directory" error. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29678efb..872bcd14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ endif() include("cmake/compat_find.cmake") find_package(Threads REQUIRED) -find_package(CapnProto 0.7 QUIET NO_MODULE) +find_package(CapnProto 0.7 QUIET NO_MODULE NO_SYSTEM_ENVIRONMENT_PATH) if(NOT CapnProto_FOUND) message(FATAL_ERROR "Cap'n Proto is required but was not found.\n"