From 9827b909830eb02a1eab38e783db9d61d9a05de1 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Sat, 27 Nov 2021 08:51:39 -0500 Subject: buildsystem - disable building Gtk docs with STATIC_ONLY --- doc/reference/libical-glib/CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'doc') 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 content if(ENABLE_GTK_DOC) + include(GtkDoc) set(SOURCEDIRS ${CMAKE_BINARY_DIR}/src/libical-glib -- cgit v1.2.1