message(" Building inotify support: ${DBUS_BUS_ENABLE_INOTIFY} ")
message(" Building kqueue support: ${DBUS_BUS_ENABLE_KQUEUE} ")
message(" Building Doxygen docs: ${DBUS_ENABLE_DOXYGEN_DOCS} ")
+message(" Building Qt help docs: ${DBUS_ENABLE_QTHELP_DOCS} ")
message(" Building XML docs: ${DBUS_ENABLE_XML_DOCS} ")
message(" Daemon executable name: ${DBUS_DAEMON_NAME}")
if(WIN32)
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
+
+#---------------------------------------------------------------------------
+# Configuration::qt creator help support
+#---------------------------------------------------------------------------
+GENERATE_QHP = @DOXYGEN_GENERATE_QHP@
+QHP_NAMESPACE = org.freedesktop.dbus
+QHG_LOCATION = @DOXYGEN_QHG_LOCATION@
+QCH_FILE = @DOXYGEN_QCH_FILE@
// build DOXYGEN documentation (requires Doxygen)
DBUS_ENABLE_DOXYGEN_DOCS:BOOL=OFF
+// build qt help documentation (requires qhelpgenerator(-qt5));
+// set INSTALL_QCH_DIR for custom qch installation path
+ENABLE_QT_HELP:STRING=AUTO
+
// enable bus daemon usage statistics
DBUS_ENABLE_STATS:BOOL=OFF
# version info and uac manifest can be combined in a binary because they use different resource types
list(APPEND ${_sources} ${CMAKE_CURRENT_BINARY_DIR}/versioninfo-${DBUS_VER_INTERNAL_NAME}.rc)
endmacro()
+
+#
+# provide option with three states AUTO, ON, OFF
+#
+macro(tristateoption _name _default _text)
+ if(NOT DEFINED ${_name})
+ set(${_name} ${_default} CACHE STRING "${_text}" FORCE)
+ else()
+ set(${_name} ${_default} CACHE STRING "${_text}")
+ endif()
+ set_property(CACHE ${_name} PROPERTY STRINGS AUTO ON OFF)
+endmacro(tristateoption)
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT($enable_doxygen_docs)
+AC_ARG_WITH([qchdir],
+ AS_HELP_STRING([--with-qchdir=DIR], [Directory for installing Qt help file]),
+ [qchdir=$withval],
+ [qchdir="$docdir"])
+AC_SUBST([qchdir])
+
+AC_ARG_ENABLE([qt-help],
+ [AS_HELP_STRING([--enable-qt-help=auto|yes|no], [Build Qt help documentation])],
+ [],
+ [enable_qt_help=auto])
+AS_IF([test "x$enable_qt_help" != xno],
+ [AC_CHECK_PROGS([QHELPGENERATOR], [qhelpgenerator qhelpgenerator-qt5])],
+ [QHELPGENERATOR=])
+AS_IF([test "x$QHELPGENERATOR" = x && test "x$enable_qt_help" != xno && test "x$enable_qt_help" != xauto],
+ [AC_MSG_ERROR([Building of Qt help requested, but qhelpgenerator not found])])
+
+AC_MSG_CHECKING([whether to build Qt help documentation])
+AS_IF([test "x$enable_doxygen_docs" = xyes && test "x$QHELPGENERATOR" != x], [
+ enable_qthelp_docs=yes
+ DOXYGEN_GENERATE_QHP=YES
+ DOXYGEN_QHG_LOCATION="$QHELPGENERATOR"
+ DOXYGEN_QCH_FILE="$(pwd)/doc/api/qch/dbus-$VERSION.qch"
+ ], [
+ DOXYGEN_GENERATE_QHP=NO
+ enable_qthelp_docs=no
+ ])
+AC_SUBST([DOXYGEN_GENERATE_QHP])
+AC_SUBST([DOXYGEN_QHG_LOCATION])
+AC_SUBST([DOXYGEN_QCH_FILE])
+
+AM_CONDITIONAL([DBUS_QTHELP_DOCS_ENABLED], [test "x$enable_qthelp_docs" = xyes])
+AC_MSG_RESULT($enable_qthelp_docs)
+
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
AM_CONDITIONAL([DBUS_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
Traditional activation: ${enable_traditional_activation}
Building X11 code: ${have_x11}
Building Doxygen docs: ${enable_doxygen_docs}
+ Building Qt help file: ${enable_qthelp_docs}
Building Ducktype docs: ${enable_ducktype_docs}
Building XML docs: ${enable_xml_docs}
Building launchd support: ${have_launchd}
if(DOXYGEN_EXECUTABLE)
option(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON)
+ tristateoption(ENABLE_QT_HELP AUTO "build qt help documentation (requires qhelpgenerator(-qt5)); set INSTALL_QCH_DIR for custom qch installation path")
endif()
if(DBUS_ENABLE_DOXYGEN_DOCS)
else()
set(DBUS_GENERATE_MAN YES)
endif()
+ if(NOT DEFINED INSTALL_QCH_DIR)
+ set(INSTALL_QCH_DIR ${CMAKE_INSTALL_DATADIR}/doc/dbus)
+ endif()
+ find_program(QHELPGENERATOR_EXECUTABLE NAMES qhelpgenerator qhelpgenerator-qt5)
+ if(ENABLE_QT_HELP AND NOT ENABLE_QT_HELP STREQUAL "AUTO" AND NOT QHELPGENERATOR_EXECUTABLE)
+ message(FATAL_ERROR "Qt help requested but qhelpgenerator not found")
+ endif()
+ if(ENABLE_QT_HELP AND QHELPGENERATOR_EXECUTABLE)
+ message(STATUS "${QHELPGENERATOR_EXECUTABLE} found")
+ set(DOXYGEN_GENERATE_QHP YES)
+ set(DOXYGEN_QHG_LOCATION ${QHELPGENERATOR_EXECUTABLE})
+ set(DOXYGEN_QCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/api/qch/dbus-${VERSION}.qch)
+ set(DBUS_ENABLE_QTHELP_DOCS ON PARENT_SCOPE)
+ install(FILES ${DOXYGEN_QCH_FILE} DESTINATION ${INSTALL_QCH_DIR})
+ else()
+ set(DOXYGEN_GENERATE_QHP NO)
+ set(DBUS_ENABLE_QTHELP_DOCS OFF PARENT_SCOPE)
+ endif()
configure_file(../Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile )
file(GLOB dbus_files "${CMAKE_SOURCE_DIR}/dbus/*.[ch]*")
add_custom_command(
install-data-local:: doxygen.stamp
$(MKDIR_P) $(DESTDIR)$(apidir)
$(INSTALL_DATA) api/html/* $(DESTDIR)$(apidir)
+if DBUS_QTHELP_DOCS_ENABLED
+ $(MKDIR_P) $(DESTDIR)$(qchdir)
+ $(INSTALL_DATA) $(DOXYGEN_QCH_FILE) $(DESTDIR)$(qchdir)
+endif
if DBUS_DUCKTYPE_DOCS_ENABLED
$(AM_V_at)for x in $(YELP_STATIC_HTML); do \
if test -e "$$x"; then \
rm -f $(DESTDIR)$(docdir)/*.txt
rm -f $(DESTDIR)$(htmldir)/*.png
rm -f $(DESTDIR)$(htmldir)/*.svg
+ rm -f $(DESTDIR)$(apidir)/*.qhp
+ rm -f $(DESTDIR)$(qchdir)/dbus-*.qch
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \
rmdir $(DESTDIR)$(apidir)
endif
if [ "$ci_host/$ci_variant/$ci_suite" = "native/production/buster" ]; then
$sudo apt-get -qq -y --no-install-recommends install \
- qttools5-dev-tools \
+ qttools5-dev-tools qt5-default \
${NULL}
fi