summaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
commite02c3a9ec2b2f7a8d4aecd70f2ecdae27c207aa9 (patch)
treeffa99f96949f3eab728a1b8caecdd014ea8d6f81 /doc/CMakeLists.txt
parentb2cfacf1180e4b3fcbb2ae2ea52cf270ef74e971 (diff)
parent61fef4ddbec8f70bb9e213ac0491d4e6cfefab30 (diff)
Merge branch 'cmake'
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt85
1 files changed, 85 insertions, 0 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 000000000..d54303deb
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,85 @@
+include(Documentation)
+
+set(LINGUAS
+ de
+ es
+ fr
+ it
+ ja
+ nl
+ pl
+ pt_BR
+ pt
+)
+
+set(ENTITIES
+ apt.ent
+ apt-verbatim.ent
+ ../vendor/${CURRENT_VENDOR}/apt-vendor.ent
+)
+
+if(WITH_DOC)
+add_docbook(apt-doc HTML TEXT ALL
+ DOCUMENTS
+ guide.dbk
+ offline.dbk
+ INSTALL ${CMAKE_INSTALL_DOCDIR}/../apt-doc
+ LINGUAS ${LINGUAS}
+ DEPENDS ${ENTITIES}
+)
+
+add_docbook(libapt-pkg-doc HTML TEXT ALL
+ DOCUMENTS
+ design.dbk
+ dpkg-tech.dbk
+ files.dbk
+ method.dbk
+ INSTALL ${CMAKE_INSTALL_DOCDIR}/../libapt-pkg-doc
+ LINGUAS ${LINGUAS}
+ DEPENDS ${ENTITIES}
+)
+
+find_package(Doxygen)
+
+file(GLOB_RECURSE apt_pkg "../apt-pkg/*.h" "../apt-pkg/*.cc")
+configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/doxygen.stamp
+ COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/doxygen.stamp
+ DEPENDS ${apt_pkg} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+)
+
+add_custom_target(apt-doxygen ALL
+ DEPENDS ${PROJECT_BINARY_DIR}/doc/doxygen.stamp
+)
+
+install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/doxygen/html
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/../libapt-pkg-doc)
+
+endif()
+
+add_docbook(apt-man MANPAGE ALL
+ DOCUMENTS
+ apt.8.xml
+ apt-cache.8.xml
+ apt-cdrom.8.xml
+ apt.conf.5.xml
+ apt-config.8.xml
+ apt-extracttemplates.1.xml
+ apt-ftparchive.1.xml
+ apt-get.8.xml
+ apt-key.8.xml
+ apt-mark.8.xml
+ apt_preferences.5.xml
+ apt-secure.8.xml
+ apt-sortpkgs.1.xml
+ sources.list.5.xml
+ DEPENDS ${ENTITIES}
+ LINGUAS ${LINGUAS}
+)
+
+add_update_po4a(update-po4a po/${PROJECT_NAME}-doc.pot "po/header.pot.txt")
+
+add_subdirectory(examples)