summaryrefslogtreecommitdiff
path: root/jcnf/yajl/YAJLDoc.cmake
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
commit22f703cab05b7cd368f4de9e03991b7664dc5022 (patch)
tree6f4d50beaa42328e24b1c6b56b6ec059e4ef21a5 /jcnf/yajl/YAJLDoc.cmake
Initial import of argyll version 1.5.1-8debian/1.5.1-8
Diffstat (limited to 'jcnf/yajl/YAJLDoc.cmake')
-rw-r--r--jcnf/yajl/YAJLDoc.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/jcnf/yajl/YAJLDoc.cmake b/jcnf/yajl/YAJLDoc.cmake
new file mode 100644
index 0000000..049cdef
--- /dev/null
+++ b/jcnf/yajl/YAJLDoc.cmake
@@ -0,0 +1,26 @@
+FIND_PROGRAM(doxygenPath doxygen)
+
+IF (doxygenPath)
+ SET (YAJL_VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO})
+ SET(yajlDirName yajl-${YAJL_VERSION})
+ SET(docPath
+ "${CMAKE_CURRENT_BINARY_DIR}/${yajlDirName}/share/doc/${yajlDirName}")
+ MESSAGE("** using doxygen at: ${doxygenPath}")
+ MESSAGE("** documentation output to: ${docPath}")
+
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/YAJL.dxy
+ ${CMAKE_CURRENT_BINARY_DIR}/YAJL.dxy @ONLY)
+
+ FILE(MAKE_DIRECTORY "${docPath}")
+
+ ADD_CUSTOM_TARGET(doc
+ ${doxygenPath} YAJL.dxy
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+ELSE (doxygenPath)
+ MESSAGE("!! doxygen not found, not generating documentation")
+ ADD_CUSTOM_TARGET(
+ doc
+ echo doxygen not installed, not generating documentation
+ )
+ENDIF (doxygenPath)