summaryrefslogtreecommitdiffstats
path: root/Modules/FindDoxygen.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindDoxygen.cmake')
-rw-r--r--Modules/FindDoxygen.cmake17
1 files changed, 17 insertions, 0 deletions
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,