DocBook XML & XSL: new dependencies

Alexander Neundorf neundorf at kde.org
Wed May 5 20:16:18 CEST 2010


On Tuesday 04 May 2010, Luigi Toscano wrote:
> 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 the two find-modules supposed to be installed ?
IOW, are docbookxml and docbook xsl only required when building kdelibs or for 
all other KDE modules too ?

Things which should be changed:
* use the find_package_handle_standard_args() macro for the status output at 
the end and setting <package>_FOUND.
* I would remove the shortcuts at the top of the file "if (DOCBOOKXSL_DIR)", 
the results of the find_file/path/program/library() commands are cached, so I 
don't think it really makes it noticable faster.
* for the search paths, I would suggest you try something with PATH_SUFFIXES, 
like  

 find_path (DOCBOOKXML_CURRENTDTD_DIR catalog.xml 
      PATHS /usr
            /usr/local

      PATH_SUFFIXES share/xml/docbook/${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/sgml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/xml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/xml/docbook/schema/dtd/${DOCBOOK_XML_CURRENTDTD_VERSION}
   )

or maybe 

 find_path (DOCBOOKXML_CURRENTDTD_DIR catalog.xml 
      PATHS ${CMAKE_SYSTEM_PREFIX_PATH}

      PATH_SUFFIXES share/xml/docbook/${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/sgml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/xml/docbook/xml-dtd-${DOCBOOK_XML_CURRENTDTD_VERSION}
          share/xml/docbook/schema/dtd/${DOCBOOK_XML_CURRENTDTD_VERSION}
   )


This way also the CMAKE_PREFIX_PATH environment variable should work to hint 
cmake where these thins are installed.
Please play around with this a bit to get a nice good working solution :-)
(CMAKE_SYSTEM_PREFIX_PATH is set in cmake/Modules/Platform/UnixPath.cmake)

> 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), 

Well, if this change is necessary, then do it.

Alex


More information about the Kde-buildsystem mailing list