Commit c1aa41c5 authored by Mike Kremer's avatar Mike Kremer

Added documentation target for each plugin. If "Documentation" folder contains...

Added documentation target for each plugin. If "Documentation" folder contains an html folder, the build system only copies this folder to the shared doc folder in the build directory instead of compiling the doc via doxygen.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9366 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 22aebbd5
......@@ -232,28 +232,37 @@ function (_build_openflipper_plugin plugin)
${${_PLUGIN}_DIRS}
)
# Add plugin documentation
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Documentation)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/doxy.config.in)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/CMakeLists.txt)
#message("=========================================================")
#message("${plugin}: Adding plugin documentation dir")
#message("=========================================================")
add_subdirectory(Documentation)
endif()
else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/doxy.config)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/CMakeLists.txt)
#message("=========================================================")
#message("${plugin}: Adding plugin documentation dir")
#message("=========================================================")
add_subdirectory(Documentation)
# Add documentation target
add_custom_target(${plugin}-doc COMMENT "Building documentation for plugin ${plugin}" VERBATIM)
# make doc builds this plugin's documentation as well
add_dependencies(doc ${plugin}-doc)
# Target for plugin documentation
if(TARGET ${plugin}-doc)
# Add plugin documentation
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Documentation)
# Test if html folder exists. If so, just copy it and ignore
# the doxygen branch
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html)
# Create target directories
if(NOT (IS_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin}))
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin})
endif()
# Copy the html folder
acg_copy_after_build (${plugin}-doc "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/html" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin}/html")
else (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/doxy.config.in)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Documentation/CMakeLists.txt)
add_subdirectory(Documentation)
# Create directories in order to avoid doxygen warnings
if(NOT (IS_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin}))
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/${plugin}/html)
endif()
endif()
endif()
endif()
else()
#message("=========================================================")
#message("${plugin} does not have documentation yet, skipping!")
#message("=========================================================")
endif()
endif() # documentation dir exists
endif() # target
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
......@@ -395,4 +404,4 @@ macro (openflipper_plugin)
if (NOT DISABLE_PLUGIN_${_PLUGIN})
_build_openflipper_plugin (${_plugin} ${ARGN})
endif ()
endmacro ()
endmacro ()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment