diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-02 17:47:19 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-02 17:47:19 (GMT) |
commit | 85d4d5e6ce941a6ec07de7cdbf1677d0b730bd44 (patch) | |
tree | 0bc01802299b4e63cb0643f1b4464ca1f96dd80d | |
parent | 40aedcbbaeddcb7e088c56e30f4252171e920baa (diff) | |
download | CMake-85d4d5e6ce941a6ec07de7cdbf1677d0b730bd44.zip CMake-85d4d5e6ce941a6ec07de7cdbf1677d0b730bd44.tar.gz CMake-85d4d5e6ce941a6ec07de7cdbf1677d0b730bd44.tar.bz2 |
FindDoxygen: add DOXYGEN_VERSION variable
Make it possible to write
find_package(DOXYGEN X.Y.Z)
-rw-r--r-- | Modules/FindDoxygen.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
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... |