Hi,
as I announced on kde-core-devel[1], I'm working to remove the embedded copies
of XML and XSLT files from kdelibs/kdoctools. This process will introduce two
external dependencies; I'd like to complete the migration before the release
of 4.5, so the proposed Find*.cmake modules for kdelibs are attached to this
mail, ready to be reviewed.
Apart from those new modules, I need to change also KDE4Macros.cmake (see the
attached patch), but before doing it, I must change the code in kdoctools/ a bit.
[1]http://markmail.org/message/rp6gj6evd3zwgl3j
Regards,
--
Luigi
# Try to find DocBook XML DTDs
# Once done, it will define:
#
# DOCBOOKXML_FOUND - system has the required DocBook XML DTDs
# DOCBOOKXML_CURRENTDTD_VERSION - the version of currently used DocBook XML
# DTD
# DOCBOOKXML_CURRENTDTD_DIR - the directory containing the definition of
# the currently used DocBook XML version
# DOCBOOKXML_CURRENTDTD_VERSION - if defined, the version of previously used
# DocBook XML DTD
# DOCBOOKXML_OLDDTD_DIR - if defined and different from
# DOCBOOKXML_CURRENTDTD_DIR, the directory containing the definition of
# previously used DocBook XML version
#
# Copyright (c) 2010, Luigi Toscano, <luigi.tosc...@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (DOCBOOKXML_CURRENTDTD_DIR AND DOCBOOK_XML_CURRENTDTD_VERSION)
set (DOCBOOKXML_FOUND TRUE)
set (DOCBOOKXML_FIND_QUIETLY TRUE)
else (DOCBOOKXML_CURRENTDTD_DIR AND DOCBOOK_XML_CURRENTDTD_VERSION)
set (DOCBOOK_XML_CURRENTDTD_VERSION "4.2")
find_path (DOCBOOKXML_CURRENTDTD_DIR catalog.xml
/usr/share/xml/docbook/schema/dtd/${DOCBOOK_XML_CURRENTDTD_VERSION}
/usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
/usr/share/sgml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
/usr/share/xml/docbook/${DOCBOOK_XML_CURRENTDTD_VERSION}
)
#set (DOCBOOKXML_OLDDTD_DIR ${DOCBOOKXML_CURRENTDTD_DIR})
#set (DOCBOOK_XML_OLDDTD_VERSION "4.1.2")
#find_path (DOCBOOKXML_OLDDTD_DIR catalog.xml
# /usr/share/xml/docbook/schema/dtd/${DOCBOOK_XML_OLDDTD_VERSION}
# /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_OLDDTD_VERSION}
# /usr/share/sgml/docbook/xml-dtd-${DOCBOOK_XML_OLDDTD_VERSION}
# /usr/share/xml/docbook/${DOCBOOK_XML_OLDDTD_VERSION}
#)
if (DOCBOOKXML_CURRENTDTD_DIR)
set (DOCBOOKXML_FOUND TRUE)
endif (DOCBOOKXML_CURRENTDTD_DIR)
if (DOCBOOKXML_FOUND)
if (NOT DOCBOOKXML_FIND_QUIETLY)
message (STATUS "Found DocBook XML DTDs v${DOCBOOK_XML_CURRENTDTD_VERSION}: ${DOCBOOKXML_CURRENTDTD_DIR}")
endif (NOT DOCBOOKXML_FIND_QUIETLY)
else (DOCBOOKXML_FOUND)
message (FATAL_ERROR "Could NOT find DocBook XML DTDs (v${DOCBOOK_XML_CURRENTDTD_VERSION})")
endif (DOCBOOKXML_FOUND)
mark_as_advanced (DOCBOOKXML_CURRENTDTD_DIR DOCBOOKXML_OLDDTD_DIR)
endif (DOCBOOKXML_CURRENTDTD_DIR AND DOCBOOK_XML_CURRENTDTD_VERSION)
# Try to find DocBook XSL stylesheet
# Once done, it will define:
#
# DOCBOOKXSL_FOUND - system has the required DocBook XML DTDs
# DOCBOOKXSL_DIR - the directory containing the stylesheets
# used to process DocBook XML
#
# Copyright (c) 2010, Luigi Toscano, <luigi.tosc...@tiscali.it>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (DOCBOOKXSL_DIR)
set (DOCBOOKXSL_FOUND TRUE)
set (DOCBOOKXSL_FIND_QUIETLY TRUE)
else (DOCBOOKXSL_DIR)
find_path (DOCBOOKXSL_DIR VERSION
/usr/share/xml/docbook/stylesheet/docbook-xsl
/usr/share/sgml/docbook/xsl-stylesheets
/usr/share/xml/docbook/stylesheet/nwalsh/current
)
if (DOCBOOKXSL_DIR)
set (DOCBOOKXSL_FOUND TRUE)
endif (DOCBOOKXSL_DIR)
if (DOCBOOKXSL_FOUND)
if (NOT DOCBOOKXSL_FIND_QUIETLY)
message (STATUS "Found DocBook XSL stylesheets: ${DOCBOOKXSL_DIR}")
endif (NOT DOCBOOKXSL_FIND_QUIETLY)
else (DOCBOOKXSL_FOUND)
message (FATAL_ERROR "Could NOT find DocBook XSL stylesheets for DocBook XML")
endif (DOCBOOKXSL_FOUND)
mark_as_advanced (DOCBOOKXSL_DIR)
endif (DOCBOOKXSL_DIR)
Index: cmake/modules/KDE4Macros.cmake
===================================================================
--- cmake/modules/KDE4Macros.cmake (revisione 1114942)
+++ cmake/modules/KDE4Macros.cmake (copia locale)
@@ -282,7 +282,7 @@
#Bootstrap
if (_kdeBootStrapping)
set(_ssheet ${CMAKE_SOURCE_DIR}/kdoctools/customization/kde-chunk.xsl)
- set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/")
+ set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/")
else (_kdeBootStrapping)
set(_ssheet ${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl)
set(_bootstrapOption)
@@ -361,7 +361,7 @@
#Bootstrap
if (_kdeBootStrapping)
set(_ssheet "${CMAKE_SOURCE_DIR}/kdoctools/docbook/xsl/manpages/docbook.xsl")
- set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/")
+ set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/")
else (_kdeBootStrapping)
set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/docbook/xsl/manpages/docbook.xsl")
set(_bootstrapOption)
_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem