summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2012-11-13 19:14:25 -0500
committerAlan Antonuk <alan.antonuk@gmail.com>2012-11-14 23:02:24 -0500
commit5f05979a4ba73cb9c17781d3da6f43b7cd559e97 (patch)
tree7f56a1e17577bd3044eb7ed4a4d49dad2d589031 /cmake
parentef87ad4de86de4ad0cf911581cfabfe97f841b93 (diff)
downloadrabbitmq-c-5f05979a4ba73cb9c17781d3da6f43b7cd559e97.tar.gz
Refactor FindXmlTo.cmake script
Refactor FindXmlTo to use FindPackageHandleStandardArgs to have less to maintain. Also mark the XMLTO_EXECUTABLE variable as advanced so it doesn't appear in the GUI by default
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindXmlTo.cmake15
1 files changed, 5 insertions, 10 deletions
diff --git a/cmake/FindXmlTo.cmake b/cmake/FindXmlTo.cmake
index 713e0e8..8f9ecc1 100644
--- a/cmake/FindXmlTo.cmake
+++ b/cmake/FindXmlTo.cmake
@@ -3,22 +3,17 @@
# man html txt dvi ps pdf
# macro XMLTO(outfiles infiles... MODES modes...)
-set ( XmlTo_FOUND false )
-
find_program ( XMLTO_EXECUTABLE
NAMES xmlto
DOC "path to the xmlto docbook xslt frontend"
)
-if ( XMLTO_EXECUTABLE )
- set ( XmlTo_FOUND true )
-endif ( XMLTO_EXECUTABLE )
-if ( NOT XmlTo_FIND_QUIETLY )
- if ( XmlTo_FIND_REQUIRED )
- FATAL_ERROR ( "xmlto not found" )
- endif ( XmlTo_FIND_REQUIRED )
-endif ( NOT XmlTo_FIND_QUIETLY )
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XmlTo
+ REQUIRED_VARS XMLTO_EXECUTABLE)
+
+mark_as_advanced( XMLTO_EXECUTABLE )
macro ( _XMLTO_FILE outfiles mode)
#special settings