Skip to content

Commit 2a9ef1d

Browse files
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.
1 parent d6f87cf commit 2a9ef1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ else()
4747
endif()
4848

4949
# Currently no required version for pybind11
50-
if(TARGET pybind11)
50+
if(TARGET pybind11 OR TARGET pybind11::headers)
5151
# pybind11 has a variable that indicates its version already, so use that
5252
message(STATUS "Found pybind11 v${pybind11_VERSION}")
5353
else()

0 commit comments

Comments
 (0)