diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-04-23 10:01:21 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-04-24 03:43:59 +0000 |
commit | f70a7bf09b3b7fd5b835bce979535e75b381688a (patch) | |
tree | fbecdb2ea42188285eb64925c65b680924b027d2 /cmake/modules | |
parent | 84149ab769d1ff7c5bbef4118ec62e57b0f09127 (diff) |
CMake: If we find Strawberry's xsltproc, un-find it.
Strawberry Perl ships with xsltproc but no DocBook XML files, which will
break the User's and Developer's Guide targets. Set XSLTPROC_EXECUTABLE
to XSLTPROC_EXECUTABLE-NOTFOUND if "strawberry" is anywhere in its path.
Change-Id: I070eaa247a24a1a79fcdb01256dd5812aa8f6fa8
Reviewed-on: https://code.wireshark.org/review/27101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindXSLTPROC.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake index d609f64e66..f1958441a1 100644 --- a/cmake/modules/FindXSLTPROC.cmake +++ b/cmake/modules/FindXSLTPROC.cmake @@ -8,7 +8,7 @@ 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. +# versions first, and un-find xsltproc if needed. find_program(XSLTPROC_EXECUTABLE NAMES xsltproc @@ -20,6 +20,13 @@ find_program(XSLTPROC_EXECUTABLE /sbin ) +string(TOLOWER ${XSLTPROC_EXECUTABLE} _xe_lower) +if(${_xe_lower} MATCHES "strawberry") + set(_ignore_reason "Strawberry xsltproc found at ${XSLTPROC_EXECUTABLE}. Ignoring.") + message(STATUS ${_ignore_reason}) + set(XSLTPROC_EXECUTABLE XSLTPROC_EXECUTABLE-NOTFOUND CACHE FILEPATH ${_ignore_reason} FORCE) +endif() + # Handle the QUIETLY and REQUIRED arguments and set XSLTPROC_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) |