FindDoxygen: add DOXYGEN_VERSION variable

Make it possible to write
find_package(DOXYGEN X.Y.Z)
This commit is contained in:
Yury G. Kudryashov 2012-01-02 18:47:19 +01:00 committed by Rolf Eike Beer
parent 40aedcbbae
commit 85d4d5e6ce
1 changed files with 6 additions and 1 deletions

View File

@ -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...