azure-sdk-for-cpp/cmake-modules/doxygen_common.cmake
Daniel Jurek 3e4fa18377
Add docs.microsoft.com artifact generation (#576)
* Add version.txt
* Add doc generation for template
* Add version.hpp parsing and update capabilities to cmake and engsys
* Get-SdkVersion -> Get-PkgVersion
* Move Update-PkgVersion.ps1 under eng/scripts
* Get-PackageVersion -> Get-PkgVersion
* Update paths, params, verbosity
* Couple fixes to output and make use of new SemVer version
* Add fallback support for verison.txt in cases where we still use it to unblock release artifact generation
* Use version information in release pipeline
* Add workaround to generate storage pipeline artifacts
* eng/scripts/
* Write warning
* Haven't released storage-file-shares yet according to releases on GitHub
* Set release date on changelog.md
* Update CHANGELOG.md to indicate this is a test release
* Add docs.microsoft.com artifact generation
* Add arguments
* newline
* d->s
* publish docs.ms artifact
* Consolidate archetype-sdk-client.yml docs.ms generation steps
* publish not the docs.ms for we publish it as part of packages
* Better folder structure
2020-09-03 21:08:30 -07:00

33 lines
1.3 KiB
CMake

# Creates custom targets for documentation generation if
# BUILD_DOCUMENTATION == YES
# Usage: generate_documentation(azure-core 1.0.0-preview.1)
# Requires: Doxygen
# Target name in the form of ${PROJECT_NAME}-docs (e.g. azure-core-docs)
function(generate_documentation PROJECT_NAME PROJECT_VERSION)
if(BUILD_DOCUMENTATION)
find_package(Doxygen REQUIRED doxygen)
set(DOXYGEN_PROJECT_NAME ${PROJECT_NAME})
set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION})
set(DOXYGEN_OUTPUT_DIRECTORY docs)
set(DOXYGEN_LAYOUT_FILE ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/DoxygenLayout.xml)
set(DOXYGEN_RECURSIVE YES)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ./README.md)
set(DOXYGEN_INLINE_SOURCES YES)
set(DOXYGEN_IGNORE_PREFIX az_ AZ_)
set(DOXYGEN_HTML_HEADER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/header.html)
set(DOXYGEN_HTML_FOOTER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/footer.html)
set(DOXYGEN_HTML_STYLESHEET ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/style.css)
set(DOXYGEN_GENERATE_XML YES)
set(DOXYGEN_GENERATE_LATEX NO)
# Use MathJax instead of latex to render formulas
set(DOXYGEN_USE_MATHJAX YES)
doxygen_add_docs(${PROJECT_NAME}-docs
ALL
COMMENT "Generate documentation for ${TARGET_NAME}")
endif()
endfunction()