[NFC][libunbind] Fix Sphinx error during CMake invocation
An error has occurred when I build libunwind with -DLLVM_BUILD_DOCS=ON.
Reviewed By: #libunwind, compnerd
Differential Revision: https://reviews.llvm.org/D96107
GitOrigin-RevId: 77fecc07955f51db3f184ba10d3f5fcd1f3f152d
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index c226f2f..79b87eb 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -1,5 +1,5 @@
include(FindSphinx)
-if (SPHINX_FOUND)
+if (SPHINX_FOUND AND LLVM_ENABLE_SPHINX)
include(AddSphinxTarget)
if (${SPHINX_OUTPUT_HTML})
add_sphinx_target(html libunwind)