summaryrefslogtreecommitdiffstats
path: root/UseDoxygen.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'UseDoxygen.cmake')
-rw-r--r--UseDoxygen.cmake25
1 files changed, 15 insertions, 10 deletions
diff --git a/UseDoxygen.cmake b/UseDoxygen.cmake
index 245ba56..66978fc 100644
--- a/UseDoxygen.cmake
+++ b/UseDoxygen.cmake
@@ -32,7 +32,7 @@
# "${CMAKE_CURRENT_BINARY_DIR}/foo.c" "${CMAKE_CURRENT_BINARY_DIR}/bar/"
#
# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored.
-# Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doc".
+# Defaults to "${CMAKE_CURRENT_BINARY_DIR}/doxygen".
#
# DOXYFILE_LATEX - ON/OFF; Set to "ON" if you want the LaTeX documentation
# to be built.
@@ -57,20 +57,32 @@ macro(usedoxygen_set_default name value type docstring)
endif()
endmacro()
-find_package(Doxygen)
+if(ANDROID)
+ find_host_package(Doxygen)
+else(ANDROID)
+ find_package(Doxygen)
+endif(ANDROID)
if(DOXYGEN_FOUND)
+ if(ANDROID)
+ # android-cmake doesn't provide a find_host_file and here's the workaround
+ set(_save_root_path ${CMAKE_FIND_ROOT_PATH})
+ set(CMAKE_FIND_ROOT_PATH)
+ endif(ANDROID)
find_file(DOXYFILE_IN "Doxyfile.in"
PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/"
NO_DEFAULT_PATH
DOC "Path to the doxygen configuration template file")
+ if(ANDROID)
+ set(CMAKE_FIND_ROOT_PATH $_save_root_path)
+ endif(ANDROID)
set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DOXYFILE_IN DEFAULT_MSG "DOXYFILE_IN")
endif()
if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
- usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc"
+ usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen"
PATH "Doxygen output directory")
usedoxygen_set_default(DOXYFILE_HTML_DIR "html"
STRING "Doxygen HTML output directory")
@@ -134,11 +146,4 @@ if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
-
- get_target_property(DOC_TARGET doc TYPE)
- if(NOT DOC_TARGET)
- add_custom_target(doc)
- endif()
-
- add_dependencies(doc doxygen)
endif()