summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2021-11-27 08:51:39 -0500
committerAllen Winter <allen.winter@kdab.com>2021-11-27 08:51:39 -0500
commit9827b909830eb02a1eab38e783db9d61d9a05de1 (patch)
treed3a0443507632b147c3227b08eb06eca54bf796f
parentadf25615bd350d22897db6ea62f7f89842a6338b (diff)
downloadlibical-git-9827b909830eb02a1eab38e783db9d61d9a05de1.tar.gz
buildsystem - disable building Gtk docs with STATIC_ONLY
-rw-r--r--cmake/modules/GtkDoc.cmake6
-rw-r--r--doc/reference/libical-glib/CMakeLists.txt17
2 files changed, 16 insertions, 7 deletions
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index 03ff3cef..2cf76aaa 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -18,12 +18,6 @@
# It also adds custom target gtkdoc-rebuild-${_module}-sgml to rebuild the sgml.in
# file based on the current sources.
-option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True)
-
-if(NOT ENABLE_GTK_DOC)
- return()
-endif()
-
find_program(GTKDOC_SCAN gtkdoc-scan)
find_program(GTKDOC_SCANGOBJ gtkdoc-scangobj)
find_program(GTKDOC_MKDB gtkdoc-mkdb)
diff --git a/doc/reference/libical-glib/CMakeLists.txt b/doc/reference/libical-glib/CMakeLists.txt
index ca58244c..c4f8b594 100644
--- a/doc/reference/libical-glib/CMakeLists.txt
+++ b/doc/reference/libical-glib/CMakeLists.txt
@@ -1,4 +1,18 @@
-include(GtkDoc)
+
+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
@@ -15,6 +29,7 @@ include(GtkDoc)
# 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