blob: c4f8b5941afae2d0ce7071a835bb498e2e2aaac7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True)
if(NOT ENABLE_GTK_DOC)
return()
endif()
if(STATIC_ONLY)
message(FATAL_ERROR
"You are attempting to build the Gtk docs, "
"however that option is not supported when building static libraries only. "
"Please disable the static only option (-DSTATIC_ONLY=False) "
"if you really want to build the Gtk docs. Alternatively, you can "
"disable building Gtk docs (by passing -DENABLE_GTK_DOC=False to cmake).")
endif()
# To regenerate libical-glib-docs.xml.in from current sources use these steps:
# a) delete ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-docs.xml
# b) go to ${CMAKE_CURRENT_BINARY_DIR} and run command:
# gtkdoc-scan --module=libical-glib --source-dir=../../../src/libical-glib/
# --deprecated-guards="LIBICAL_GLIB_DISABLE_DEPRECATED"
# --ignore-headers=libical-glib-private.h --rebuild-sections --rebuild-types
# c) generate the libical-glib-docs.xml file with command:
# gtkdoc-mkdb --module=libical-glib --output-format=xml
# --source-dir=../../../src/libical-glib/ --xml-mode --name-space=i-cal
# d) copy the newly created libical-glib-docs.xml
# to ${CURRENT_SOURCE_DIR}/libical-glib-docs.xml.in
# e) compare the changes in the file and return back what should be left,
# like the replacement of the "[Insert title here]" and the <bookinfo/> content
if(ENABLE_GTK_DOC)
include(GtkDoc)
set(SOURCEDIRS
${CMAKE_BINARY_DIR}/src/libical-glib
)
set(DEPENDENCIES
ical-glib
)
set(IGNORE_HEADERS
libical-glib-private.h
)
add_gtkdoc(libical-glib libical-glib "LIBICAL_GLIB_DISABLE_DEPRECATED" SOURCEDIRS DEPENDENCIES IGNORE_HEADERS)
endif()
|