X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=yajl%2FYAJLDoc.cmake;fp=yajl%2FYAJLDoc.cmake;h=049cdef2c43b3677847d7aa49546b47b027e55c6;hp=0000000000000000000000000000000000000000;hb=79b5f738f2e38acb60cda7e09f54802933a17105;hpb=a891a2dcbbb63d9e771da6efff00a33da614e737 diff --git a/yajl/YAJLDoc.cmake b/yajl/YAJLDoc.cmake new file mode 100644 index 0000000..049cdef --- /dev/null +++ b/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)