]> granicus.if.org Git - json-c/commitdiff
doc: Move Doxyfile into doc subdir
authorBjörn Esser <besser82@fedoraproject.org>
Mon, 18 May 2020 18:32:35 +0000 (20:32 +0200)
committerBjörn Esser <besser82@fedoraproject.org>
Mon, 18 May 2020 18:36:16 +0000 (20:36 +0200)
.gitignore
CMakeLists.txt
doc/CMakeLists.txt [new file with mode: 0644]
doc/Doxyfile.in [moved from Doxyfile.in with 99% similarity]

index 958ace3ac113fefa8662fdac36f0775989a8e082..1cdaf9bdbaf9420991d2aa26d78f7029b10c3c45 100644 (file)
@@ -83,7 +83,7 @@
 /Testing/
 
 # ...and build artifacts.
-/doc
+/doc/html
 /libjson-c.a
 /libjson-c.so
 /libjson-c.so.*
index f58301c71abe3e0af6b5c35f1c30b0200a2d724c..ec17697170c1209343771ef1475d66d3ccd9a7f3 100644 (file)
@@ -361,24 +361,7 @@ set(JSON_C_SOURCES
 include_directories(${PROJECT_SOURCE_DIR})
 include_directories(${PROJECT_BINARY_DIR})
 
-# generate doxygen documentation for json-c API
-
-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)
+add_subdirectory(doc)
 
 # uninstall
 add_custom_target(uninstall
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4872d8e
--- /dev/null
@@ -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)
similarity index 99%
rename from Doxyfile.in
rename to doc/Doxyfile.in
index 42a08535c2bd19cd36805a7c1ac0aca496a27640..ce8d8ff78cd35afcf33eeff43a0720b91039459d 100644 (file)
@@ -58,7 +58,7 @@ PROJECT_LOGO           =
 # entered, it will be relative to the location where doxygen was started. If
 # 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-
 # directories (in 2 levels) under the output directory of each output format and