From 2a9ef1df23d61fcab088f51a3329c38a567d9642 Mon Sep 17 00:00:00 2001 From: Nick Robison Date: Wed, 9 Sep 2020 08:28:13 -0400 Subject: [PATCH] Update CMakeLists to correctly find pybind11 alias targets Add an additional TARGET check in the root cmake file to correctly find the pybind11 alias targets. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cc4b1..9d278d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ else() endif() # Currently no required version for pybind11 -if(TARGET pybind11) +if(TARGET pybind11 OR TARGET pybind11::headers) # pybind11 has a variable that indicates its version already, so use that message(STATUS "Found pybind11 v${pybind11_VERSION}") else()