pip installed CMake doesn't find pip installed pybind11
To reproduce:
$ python3.9 -m venv .
$ . bin/activate
$ python3 -m pip install cmake
Collecting cmake
Using cached cmake-3.21.4-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (72.4 MB)
Installing collected packages: cmake
Successfully installed cmake-3.21.4
$ python3 -m pip install pybind11
Collecting pybind11
Using cached pybind11-2.8.1-py2.py3-none-any.whl (208 kB)
Installing collected packages: pybind11
Successfully installed pybind11-2.8.1
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.21.1)
project(Reproduce)
find_package(pybind11 REQUIRED)
$ mkdir build && cd build
$ cmake ../
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.
Could not find a package configuration file provided by "pybind11" with any
of the following names:
pybind11Config.cmake
pybind11-config.cmake
Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
"pybind11_DIR" to a directory containing one of the above files. If
"pybind11" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!