doc: Move Doxyfile into doc subdir

This commit is contained in:
Björn Esser
2020-05-18 20:32:35 +02:00
parent fa6a7dccb9
commit 61e2bae511
4 changed files with 19 additions and 20 deletions

2
.gitignore vendored
View File

@@ -83,7 +83,7 @@
/Testing/ /Testing/
# ...and build artifacts. # ...and build artifacts.
/doc /doc/html
/libjson-c.a /libjson-c.a
/libjson-c.so /libjson-c.so
/libjson-c.so.* /libjson-c.so.*

View File

@@ -361,24 +361,7 @@ set(JSON_C_SOURCES
include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR}) include_directories(${PROJECT_BINARY_DIR})
# generate doxygen documentation for json-c API add_subdirectory(doc)
find_package(Doxygen)
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation(requires Doxygen)" ${DOXYGEN_FOUND})
if (DOXYGEN_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile)
message(STATUS "Written ${PROJECT_BINARY_DIR}/Doxyfile")
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
else (DOXYGEN_FOUND)
message("Warning: doxygen not found, the 'doc' target will not be included")
endif(DOXYGEN_FOUND)
# uninstall # uninstall
add_custom_target(uninstall add_custom_target(uninstall

16
doc/CMakeLists.txt Normal file
View File

@@ -0,0 +1,16 @@
# generate doxygen documentation for json-c API
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
message(STATUS "Wrote ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
else (DOXYGEN_FOUND)
message("Warning: doxygen not found, the 'doc' target will not be included")
endif(DOXYGEN_FOUND)

View File

@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = doc OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and