

file(GLOB_RECURSE allDocTexFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.ptex")

#phoenix_calltex2htmlBook(doc_latex ${CMAKE_CURRENT_SOURCE_DIR}/phoenix_swarm.ptex ${allDocTexFiles})
phoenix_calltex2htmlBookWip(doc_latex ${CMAKE_CURRENT_SOURCE_DIR}/phoenix_swarm.ptex ${allDocTexFiles})

createSourcePTexDir(createExample ${TEST_SWARM_EXAMPLE_DIRECTORY} Examples "build;build2;.kdev4;Examples.kdev4;.container;tmp_project;output_test")
add_dependencies(doc_latex createExample)

# add_custom_command(
# 	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index.html
# 	COMMENT "latex documentation generation"
# 	COMMAND ${PHOENIX_TEX_2_HTML_EXECUTABLE} -i ${CMAKE_CURRENT_SOURCE_DIR}/phoenix_swarm.ptex -p ${CMAKE_INSTALL_PREFIX}
# 	DEPENDS ${allDocTexFiles}
# 	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# )
# add_custom_target(doc_latex DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/index.html)
add_dependencies(doc doc_latex)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION share/PhoenixSwarm/doc/)




