diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
set(KF5_VERSION "5.35.0")
project(KSyntaxHighlighting VERSION ${KF5_VERSION})
-find_package(ECM 5.34.0 REQUIRED NO_MODULE)
+find_package(ECM 5.35.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
@@ -21,6 +21,7 @@
include(KDEFrameworkCompilerSettings)
include(KDECMakeSettings)
include(ECMMarkNonGuiExecutable)
+include(ECMAddQch)
ecm_setup_version(PROJECT
@@ -42,6 +43,13 @@
find_package(Perl REQUIRED)
set_package_properties(Perl PROPERTIES PURPOSE "Auto-generate PHP syntax definition files.")
+
+#
+# API documentation
+#
+option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
+add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
+
#
# Translations
#
@@ -63,6 +71,16 @@
#
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5SyntaxHighlighting")
+if (BUILD_QCH)
+ ecm_install_qch_export(
+ TARGETS KF5SyntaxHighlighting_QCH
+ FILE KF5SyntaxHighlightingQchTargets.cmake
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
+ COMPONENT Devel
+ )
+ set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5SyntaxHighlightingQchTargets.cmake\")")
+endif()
+
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5SyntaxHighlightingConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5SyntaxHighlightingConfig.cmake"
diff --git a/KF5SyntaxHighlightingConfig.cmake.in b/KF5SyntaxHighlightingConfig.cmake.in
--- a/KF5SyntaxHighlightingConfig.cmake.in
+++ b/KF5SyntaxHighlightingConfig.cmake.in
@@ -3,3 +3,4 @@
find_package(Qt5 @Qt5Core_VERSION_MAJOR@.@Qt5Core_VERSION_MINOR@ NO_MODULE REQUIRED COMPONENTS Core Gui)
include("${CMAKE_CURRENT_LIST_DIR}/KF5SyntaxHighlightingTargets.cmake")
+@PACKAGE_INCLUDE_QCHTARGETS@
diff --git a/autotests/html/highlight.cmake.html b/autotests/html/highlight.cmake.html
--- a/autotests/html/highlight.cmake.html
+++ b/autotests/html/highlight.cmake.html
@@ -35,7 +35,7 @@
PRE_LINK
COMMAND ${CMAKE_C_COMPILER}
ARGS -o ${_exe_NAME}
-$\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld
+$\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld
)
#add the created files to the make_clean_files
diff --git a/autotests/html/highlight.dox.html b/autotests/html/highlight.dox.html
--- a/autotests/html/highlight.dox.html
+++ b/autotests/html/highlight.dox.html
@@ -123,9 +123,9 @@
/** \file awo<html_should_be_i*/gnored_here>rd end of doxygen HL mode
/** \file awo<*/html_should_be_ignored_here>rd end of doxygen HL mode
/** \file a*/wo<html_should_be_ignored_here>rd end of doxygen HL mode
-/** \file aword rest of line is normal co<code>mment HL
- * comment HL mode
- */ end of doxygen HL mode
+/** \file aword rest of line is normal co<code>mment HL
+ * comment HL mode
+ */ end of doxygen HL mode
<tag> <rest of line is string>
/** \brief A short <a href="blubb"> of </a href='blubb'> description */ end of doxygen HL mode
diff --git a/autotests/html/test.c.html b/autotests/html/test.c.html
--- a/autotests/html/test.c.html
+++ b/autotests/html/test.c.html
@@ -48,15 +48,15 @@
/**
* Doxygen
* @param p1 text
- * \brief <b>bold text</b>
+ * \brief <b>bold text</b>
* \dot
* a -> b
* \enddot
*
* \verbatim
* <dummy>
* \endverbatim
- * <html>text</html>
+ * <html>text</html>
*/
#endif
diff --git a/autotests/reference/highlight.cmake.ref b/autotests/reference/highlight.cmake.ref
--- a/autotests/reference/highlight.cmake.ref
+++ b/autotests/reference/highlight.cmake.ref
@@ -29,7 +29,7 @@
PRE_LINK
COMMAND ${CMAKE_C_COMPILER}
ARGS -o ${_exe_NAME}
-$\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld
+$\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld
)
#add the created files to the make_clean_files
diff --git a/autotests/reference/highlight.dox.ref b/autotests/reference/highlight.dox.ref
--- a/autotests/reference/highlight.dox.ref
+++ b/autotests/reference/highlight.dox.ref
@@ -117,9 +117,9 @@
/** \file awo*/gnored_here>rd end of doxygen HL mode
/** \file awo<*/html_should_be_ignored_here>rd end of doxygen HL mode
/** \file a*/word end of doxygen HL mode
-/** \file aword rest of line is normal comment HL
- * comment HL mode
- */ end of doxygen HL mode
+/** \file aword rest of line is normal comment HL
+ * comment HL mode
+ */ end of doxygen HL mode
/** \brief A short href="blubb"> of href='blubb'> description */ end of doxygen HL mode
diff --git a/autotests/reference/test.c.ref b/autotests/reference/test.c.ref
--- a/autotests/reference/test.c.ref
+++ b/autotests/reference/test.c.ref
@@ -42,15 +42,15 @@
/**
* Doxygen
* @param p1 text
- * \brief bold text>
+ * \brief bold text
* \dot
* a -> b
* \enddot
*
* \verbatim
*
* \endverbatim
- * text</html>
+ * text
*/
#endif
diff --git a/data/syntax/cmake.xml b/data/syntax/cmake.xml
--- a/data/syntax/cmake.xml
+++ b/data/syntax/cmake.xml
@@ -1103,32 +1103,32 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -1226,17 +1226,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/syntax/doxygen.xml b/data/syntax/doxygen.xml
--- a/data/syntax/doxygen.xml
+++ b/data/syntax/doxygen.xml
@@ -278,7 +278,7 @@
-
+
@@ -297,7 +297,7 @@
-
+
@@ -339,7 +339,7 @@
-
+
@@ -405,7 +405,7 @@
-
+
diff --git a/data/syntax/haskell.xml b/data/syntax/haskell.xml
--- a/data/syntax/haskell.xml
+++ b/data/syntax/haskell.xml
@@ -1,6 +1,6 @@
-
+
- case
@@ -369,12 +369,17 @@
-
+
+
+
+
+
+
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -58,6 +58,27 @@
${CMAKE_CURRENT_BINARY_DIR}/ksyntaxhighlighting_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KSyntaxHighlighting)
+if(BUILD_QCH)
+ ecm_add_qch(
+ KF5SyntaxHighlighting_QCH
+ NAME KSyntaxHighlighting
+ BASE_NAME KF5SyntaxHighlighting
+ VERSION ${KF5_VERSION}
+ ORG_DOMAIN org.kde
+ SOURCES # using only public headers, to cover only public API
+ ${SyntaxHighlighting_HEADERS}
+ MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
+ LINK_QCHS
+ Qt5Core_QCH
+ Qt5Gui_QCH
+ BLANK_MACROS
+ KSYNTAXHIGHLIGHTING_EXPORT
+ KSYNTAXHIGHLIGHTING_DEPRECATED
+ TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
+ QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
+ COMPONENT Devel
+ )
+endif()
ecm_generate_pri_file(
BASE_NAME KSyntaxHighlighting LIB_NAME
KF5SyntaxHighlighting