From 5606ec4365d5ae06361fe5803facb17fff7e1cd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Jul 2026 14:07:33 +0000 Subject: [PATCH] fix(cmake): don't pass REQUIRED to find_dependency in package config find_dependency() forwards the REQUIRED/QUIET-ness requested by the caller of find_package(); hard-coding REQUIRED defeats that. A consumer doing find_package(NekoThreadPool CONFIG QUIET) got a fatal error instead of a graceful -NOTFOUND when a transitive dependency was absent. Reported by a vcpkg maintainer in microsoft/vcpkg#53099. --- cmake/NekoThreadPoolConfig.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/NekoThreadPoolConfig.cmake.in b/cmake/NekoThreadPoolConfig.cmake.in index 393efce..6ae810d 100644 --- a/cmake/NekoThreadPoolConfig.cmake.in +++ b/cmake/NekoThreadPoolConfig.cmake.in @@ -2,8 +2,10 @@ # Find required dependencies # NekoSchema is a header-only dependency, just need to find it for includes +# Note: find_dependency() must not be given REQUIRED or QUIET; it forwards the +# REQUIRED/QUIET-ness requested by the caller of find_package(NekoThreadPool). include(CMakeFindDependencyMacro) -find_dependency(NekoSchema REQUIRED) +find_dependency(NekoSchema) # Include the targets file include("${CMAKE_CURRENT_LIST_DIR}/NekoThreadPoolTargets.cmake")