diff options
| author | Dawit Alemayehu <adawit@kde.org> | 2010-05-14 04:31:59 +0000 | 
|---|---|---|
| committer | Dawit Alemayehu <adawit@kde.org> | 2010-05-14 04:31:59 +0000 | 
| commit | f5a7eacec19610c37514bc28c5553b215dd81372 (patch) | |
| tree | baf3a25e150062e61aad510fff2ff6274020f692 | |
| parent | e6741ce784dab86d89fcca4b4ec8184ba6721d25 (diff) | |
| download | extra-cmake-modules-f5a7eacec19610c37514bc28c5553b215dd81372.tar.gz extra-cmake-modules-f5a7eacec19610c37514bc28c5553b215dd81372.tar.bz2 | |
Fix the location detection of docbook xsl style sheet in platforms 
that use version number in the path names, e.g. ArchLinux.
svn path=/trunk/KDE/kdelibs/; revision=1126482
| -rw-r--r-- | modules/FindDocBookXSL.cmake | 20 | 
1 files changed, 16 insertions, 4 deletions
| diff --git a/modules/FindDocBookXSL.cmake b/modules/FindDocBookXSL.cmake index 44f69699..60ce2e70 100644 --- a/modules/FindDocBookXSL.cmake +++ b/modules/FindDocBookXSL.cmake @@ -10,12 +10,24 @@  # Redistribution and use is allowed according to the terms of the BSD license.  # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +set (STYLESHEET_PATH_LIST +    share/xml/docbook/stylesheet/docbook-xsl +    share/sgml/docbook/xsl-stylesheets +    share/xml/docbook/stylesheet/nwalsh/current +) + +foreach (STYLESHEET_PREFIX_ITER ${CMAKE_SYSTEM_PREFIX_PATH}) +   file(GLOB STYLESHEET_SUFFIX_ITER RELATIVE ${STYLESHEET_PREFIX_ITER} +        ${STYLESHEET_PREFIX_ITER}/share/xml/docbook/xsl-stylesheets-* +   ) +   if (STYLESHEET_SUFFIX_ITER) +      list (APPEND STYLESHEET_PATH_LIST ${STYLESHEET_SUFFIX_ITER}) +   endif () +endforeach () +  find_path (DOCBOOKXSL_DIR VERSION     PATHS ${CMAKE_SYSTEM_PREFIX_PATH} -   PATH_SUFFIXES -   share/xml/docbook/stylesheet/docbook-xsl -   share/sgml/docbook/xsl-stylesheets -   share/xml/docbook/stylesheet/nwalsh/current +   PATH_SUFFIXES ${STYLESHEET_PATH_LIST}  )  find_package_handle_standard_args (DocBookXSL | 
