aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/FindDocBookXSL.cmake20
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