CMake: Try to avoid Strawberry Perl's xsltproc.
authorGerald Combs <gerald@wireshark.org>
Wed, 14 Feb 2018 20:01:35 +0000 (12:01 -0800)
committerGerald Combs <gerald@wireshark.org>
Wed, 14 Feb 2018 20:23:43 +0000 (20:23 +0000)
Search for Chocolatey's and Cygwin's respective xsltprocs before searching
%PATH%. Strawberry Perl doesn't include DocBook, which makes it useless
as far as we're concerned.

Another approach would be to look in various locations for an XML catalog
files and set %XML_CATALOG_FILES%. However, Cygwin's /etc/xml/catalog
contains Cygwin-specific URLs, e.g. file:///etc/xml/docbook and can't
be used with a non-Cygwin xsltproc.

Change-Id: Iaebfdff922a6574581b9bd207625f03598c166e0
Reviewed-on: https://code.wireshark.org/review/25794
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
cmake/modules/FindXSLTPROC.cmake

index fb2d50a77a5406211d21b38c0e4d5ca4a44dcf7b..a801bdb901227a0a1f292c384256bbc8b30d8847 100644 (file)
@@ -5,13 +5,16 @@
 
 include(FindCygwin)
 
+# Strawberry Perl ships with xsltproc but no DocBook XML files, which
+# is detrimental to our interests. Search for the Chocolatey and Cygwin
+# versions first.
 find_program(XSLTPROC_EXECUTABLE
   NAMES
     xsltproc
-  PATHS
+  HINTS
+    ${ChocolateyInstall}/bin
     ${CYGWIN_INSTALL_PATH}/bin
-    /bin
-    /usr/bin
+  PATHS
     /usr/local/bin
     /sbin
 )