From 85d4d5e6ce941a6ec07de7cdbf1677d0b730bd44 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Mon, 2 Jan 2012 18:47:19 +0100 Subject: FindDoxygen: add DOXYGEN_VERSION variable Make it possible to write find_package(DOXYGEN X.Y.Z) --- Modules/FindDoxygen.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index e5428ae..6cc9efb 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -11,6 +11,7 @@ # # DOXYGEN_EXECUTABLE = The path to the doxygen command. # DOXYGEN_FOUND = Was Doxygen found or not? +# DOXYGEN_VERSION = The version reported by doxygen --version # # DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen. # DOXYGEN_DOT_FOUND = Was Dot found or not? @@ -76,8 +77,12 @@ FIND_PROGRAM(DOXYGEN_EXECUTABLE DOC "Doxygen documentation generation tool (http://www.doxygen.org)" ) +IF(DOXYGEN_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${DOXYGEN_EXECUTABLE} "--version" OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +ENDIF() + include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen REQUIRED_VARS DOXYGEN_EXECUTABLE VERSION_VAR DOXYGEN_VERSION) # # Find Dot... -- cgit v0.12