Fix doxygen doc gen.
authorTomas Mlcoch <tmlcoch@redhat.com>
Mon, 25 Feb 2013 09:38:01 +0000 (10:38 +0100)
committerTomas Mlcoch <tmlcoch@redhat.com>
Mon, 25 Feb 2013 09:56:28 +0000 (10:56 +0100)
.gitignore
CMakeLists.txt
doc/CMakeLists.txt
doc/Doxyfile.in.in [moved from Doxyfile.in with 99% similarity]
utils/make_tarball.sh

index 4c49164..4a0e369 100644 (file)
@@ -21,5 +21,4 @@ _CPack_Packages/
 src/version.h
 src/createrepo_c.pc
 build/
-doc/html
-doc/latex
+tags
index 5d06109..fef5f39 100644 (file)
@@ -93,23 +93,12 @@ INCLUDE(CPack)
 
 # Other files
 
-#SET(CMAKE_INSTALL_PREFIX "/")
 INSTALL(FILES README.md COPYING
         DESTINATION "share/doc/createrepo_c-${VERSION}")
 INSTALL(FILES createrepo_c.bash
         DESTINATION "/etc/bash_completion.d")
 
 
-# Target to generate API documentation with Doxygen
-
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-    add_custom_target(doc
-        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
-        COMMENT "Generating API documentation with Doxygen" VERBATIM)
-endif(DOXYGEN_FOUND)
-
-
 # Gen manpage
 
 #message("Gen manpage")
index a7177bc..a75fcd8 100644 (file)
@@ -1,3 +1,14 @@
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+    CONFIGURE_FILE("Doxyfile.in.in" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.in" @ONLY)
+    add_custom_target(doc-c
+        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.in
+        COMMENT "Building C API documentation with Doxygen" VERBATIM)
+endif(DOXYGEN_FOUND)
+
 INSTALL(FILES createrepo_c.8.gz mergerepo_c.8.gz
         DESTINATION share/man/man8
         COMPONENT bin)
+
+ADD_CUSTOM_TARGET (doc)
+ADD_DEPENDENCIES (doc doc-c)
similarity index 99%
rename from Doxyfile.in
rename to doc/Doxyfile.in.in
index cd8d4de..73b9153 100644 (file)
@@ -32,7 +32,7 @@ PROJECT_NAME           = "createrepo_c library"
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 
+PROJECT_NUMBER         = @VERSION@
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
@@ -52,7 +52,7 @@ PROJECT_LOGO           =
 # If a relative path is 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       = 
 
 # 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 
@@ -671,7 +671,7 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = src
+INPUT                  = @CMAKE_SOURCE_DIR@/src
 
 # This tag can be used to specify the character encoding of the source files 
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
index 1c7871f..5496c5e 100755 (executable)
@@ -40,12 +40,12 @@ echo "Using root projekt dir: $PREFIX"
     cp --verbose README.md $DIRECTORY
     cp --verbose COPYING $DIRECTORY
     cp --verbose createrepo_c.bash $DIRECTORY
-    cp --verbose Doxyfile.in $DIRECTORY
     cp --verbose VERSION.cmake $DIRECTORY
 
     cp --verbose --parents cmake/Modules/* $DIRECTORY
 
     cp --verbose --parents doc/CMakeLists.txt $DIRECTORY
+    cp --verbose --parents doc/Doxyfile.in.in $DIRECTORY
     cp --verbose --parents doc/createrepo_c.8.* $DIRECTORY
     cp --verbose --parents doc/mergerepo_c.8.* $DIRECTORY