find_package(LATEX)

if(NOT PDFLATEX_COMPILER-NOTFOUND)
	set(AQSIS_SPHINX_SEARCHPATH)

	find_program(AQSIS_SPHINX_EXECUTABLE
		sphinx-build
		paths ${AQSIS_SPHINX_SEARCHPATH}
		doc "Location of the Sphinx executables")

	string(COMPARE NOTEQUAL ${AQSIS_SPHINX_EXECUTABLE} "AQSIS_SPHINX_EXECUTABLE-NOTFOUND" AQSIS_SPHINX_EXECUTABLE_FOUND)

	message(STATUS "Found Sphinx: ${AQSIS_SPHINX_EXECUTABLE}")
endif()
