From 89c3561d9a217f494900e82cd35723402c7d3e7c Mon Sep 17 00:00:00 2001 From: Martin Blanchard <49144287+mablanchard@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:03:37 +0100 Subject: [PATCH] Fix multi-context new Python linking mode (#4401) Allow CMake find_package() from multiple directories. https://github.com/pybind/pybind11/issues/4400 Co-authored-by: Martin Blanchard --- tools/pybind11NewTools.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake index 5a6a0cb8..7d7424a7 100644 --- a/tools/pybind11NewTools.cmake +++ b/tools/pybind11NewTools.cmake @@ -9,7 +9,7 @@ if(CMAKE_VERSION VERSION_LESS 3.12) message(FATAL_ERROR "You cannot use the new FindPython module with CMake < 3.12") endif() -include_guard(GLOBAL) +include_guard(DIRECTORY) get_property( is_config