From 641a0ad878e97485dbc02b9344aa72edd2a4f24a Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 16 Oct 2006 10:47:18 -0400 Subject: BUG: fix for bug# 3310 --- Modules/FindDoxygen.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index fff6e4d..c055f43 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -4,6 +4,20 @@ # it contains the doxygen executable in the bundle. In the versions I've # seen, it is located in Resources, but in general, more often binaries are # located in MacOS. + +# The official Doxygen.app that is distributed for OS X uses non-standard +# conventions. Instead of the command-line "doxygen" tool being placed in +# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and +# "doxygen" is actually placed in Contents/Resources. This is most likely +# to accomodate people who double-click on the Doxygen.app package and expect +# to see something happen. However, the CMake backend gets horribly confused +# by this. Once CMake sees the bundle, it indiscrimately uses Doxywizard +# as the executable to use. The only work-around I have found is to disable +# the app-bundle feature for only this command. +# Save the old setting +SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE}) +# Disable the App-bundle detection feature +SET(CMAKE_FIND_APPBUNDLE "NEVER") IF (NOT DOXYGEN_FIND_QUIETLY) MESSAGE(STATUS "Looking for doxygen...") ENDIF (NOT DOXYGEN_FIND_QUIETLY) @@ -70,6 +84,9 @@ FIND_PATH(DOXYGEN_DOT_PATH DOC "Path to the Graphviz Dot tool" ) +# Restore the old app-bundle setting setting +SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE}) + MARK_AS_ADVANCED( DOXYGEN_FOUND, DOXYGEN_EXECUTABLE, -- cgit v0.12