Improve detection of sphinx-build.
authorM. Eric Irrgang <mei2n@virginia.edu>
Thu, 21 Oct 2021 09:32:44 +0000 (09:32 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Thu, 21 Oct 2021 09:32:44 +0000 (09:32 +0000)
commitaf245721dfa12586d0fefa74115585214c8dea83
treed3c7db853598eea91f6e28c647d71e48c510a6a1
parent32c8fcc1dcd614881c5ccb141cad7f21b660c347
Improve detection of sphinx-build.

Prioritize the sphinx-build associated with the current Python
interpreter, or as indicated by the user through the SPHINX_DIR
environment variable.

Mitigates problems with multiple Python installations and `autodoc`, or
where the Python installation is hinted to CMake but is not on the PATH.

Fixes #4224
cmake/FindSphinx.cmake