]> git.saurik.com Git - apt.git/blame - doc/CMakeLists.txt
CMake: Rewrite existing Documentation support and add doxygen
[apt.git] / doc / CMakeLists.txt
CommitLineData
9a2aa0e7
JAK
1include(Documentation)
2
10ec2d23
JAK
3set(LINGUAS
4 de
5 es
6 fr
7 it
8 ja
9 nl
10 pl
11 pt_BR
12 pt
13)
9a2aa0e7 14
10ec2d23
JAK
15set(ENTITIES
16 apt.ent
17 apt-verbatim.ent
18 ../vendor/${CURRENT_VENDOR}/apt-vendor.ent
19)
9a2aa0e7 20
10ec2d23
JAK
21if(WITH_DOC)
22add_docbook(apt-doc HTML TEXT ALL
23 DOCUMENTS
24 guide.dbk
25 offline.dbk
26 INSTALL ${CMAKE_INSTALL_DOCDIR}/../apt-doc
27 LINGUAS ${LINGUAS}
28 DEPENDS ${ENTITIES}
29)
30
31add_docbook(libapt-pkg-doc HTML TEXT ALL
32 DOCUMENTS
33 design.dbk
34 dpkg-tech.dbk
35 files.dbk
36 method.dbk
37 INSTALL ${CMAKE_INSTALL_DOCDIR}/../libapt-pkg-doc
38 LINGUAS ${LINGUAS}
39 DEPENDS ${ENTITIES}
40)
41
42find_package(Doxygen)
43
44file(GLOB_RECURSE apt_pkg "../apt-pkg/*.h" "../apt-pkg/*.cc")
45configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
46
47add_custom_command(
48 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/doxygen.stamp
49 COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
50 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/doxygen.stamp
51 DEPENDS ${apt_pkg} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
52)
53
54add_custom_target(apt-doxygen ALL
55 DEPENDS ${PROJECT_BINARY_DIR}/doc/doxygen.stamp
56)
57
58install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/doxygen/html
59 DESTINATION ${CMAKE_INSTALL_DOCDIR}/../libapt-pkg-doc)
9a2aa0e7 60
9a2aa0e7
JAK
61endif()
62
10ec2d23
JAK
63add_docbook(apt-man MANPAGE ALL
64 DOCUMENTS
65 apt.8.xml
66 apt-cache.8.xml
67 apt-cdrom.8.xml
68 apt.conf.5.xml
69 apt-config.8.xml
70 apt-extracttemplates.1.xml
71 apt-ftparchive.1.xml
72 apt-get.8.xml
73 apt-key.8.xml
74 apt-mark.8.xml
75 apt_preferences.5.xml
76 apt-secure.8.xml
77 apt-sortpkgs.1.xml
78 sources.list.5.xml
79 DEPENDS ${ENTITIES}
80 LINGUAS ${LINGUAS}
81)
9a2aa0e7 82
10ec2d23 83add_update_po4a(update-po4a po/${PROJECT_NAME}-doc.pot "po/header.pot.txt")
9a2aa0e7
JAK
84
85add_subdirectory(examples)