aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-12-22 01:21:56 +0000
committerJörg Mayer <jmayer@loplof.de>2013-12-22 01:21:56 +0000
commit6d17d3c4d61737b2d600af1a8f0c8317437c3731 (patch)
treefac9e494731e5984c776d156293b97bcabd82bb3 /cmake
parent48504bc5f505be3d0486acbac4ad7b687ab6db95 (diff)
Beginnings of doxygen support.
Currently the doxygen.cfg files are not designed for out-of-tree builds - that needs to be fixed first. svn path=/trunk/; revision=54348
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindDOXYGEN.cmake42
1 files changed, 42 insertions, 0 deletions
diff --git a/cmake/modules/FindDOXYGEN.cmake b/cmake/modules/FindDOXYGEN.cmake
new file mode 100644
index 0000000000..7dabad6cb5
--- /dev/null
+++ b/cmake/modules/FindDOXYGEN.cmake
@@ -0,0 +1,42 @@
+#
+# $Id$
+#
+# - Find unix commands from cygwin
+# This module looks for some usual Unix commands.
+#
+
+include( FindCygwin )
+
+find_program( DOXYGEN_EXECUTABLE
+ NAMES
+ doxygen
+ PATHS
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+
+include( FindPackageHandleStandardArgs )
+find_package_handle_standard_args( DOXYGEN DEFAULT_MSG DOXYGEN_EXECUTABLE )
+
+mark_as_advanced( DOXYGEN_EXECUTABLE )
+
+macro( DOXYGEN2HTML _output )
+ GET_FILENAME_COMPONENT(_OUTDIR ${_output} PATH)
+ SET(_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}/${_OUTDIR})
+
+ add_custom_command(
+ OUTPUT
+ COMMAND cmake
+ -E make_directory ${_OUTDIR}
+ COMMAND $(DOXYGEN_EXECUTABLE)
+ doxygen.cfg
+ COMMAND chmod
+ -R og+rX ${_OUTDIR}
+ DEPENDS
+ doxygen.cfg
+ )
+endmacro()
+