Refactor to avoid code duplication. NFC.
[oota-llvm.git] / docs / CMakeLists.txt
index f0aa9c257fe91704282bee030a64b65ad98052f9..d310a0a79105dfc12834050330167332b00409a5 100644 (file)
@@ -89,3 +89,18 @@ if (LLVM_ENABLE_DOXYGEN)
   endif()
 endif()
 endif()
+
+if (LLVM_ENABLE_SPHINX)
+  if (SPHINX_FOUND)
+    include(AddSphinxTarget)
+    if (${SPHINX_OUTPUT_HTML})
+      add_sphinx_target(html llvm)
+    endif()
+
+
+    if (${SPHINX_OUTPUT_MAN})
+      add_sphinx_target(man llvm)
+    endif()
+
+  endif()
+endif()