Skip to content

Commit

Permalink
Add pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed Oct 23, 2023
1 parent 4abca45 commit 1f3e3c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:
- name: Generate docs
run: cmake --build ${{ github.workspace }}/build --target docs-all --config Release
- name: Install docs
run: cmake --install ${{ github.workspace }}/build --config Release
run: |
cmake --install ${{ github.workspace }}/build --config Release
cmake -E copy ${{ github.workspace }}/install/share/doc/pdf/cmmm.pdf ${{ github.workspace }}/install/share/doc/html/pdf/cmmm.pdf
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CMakeMM
```

</a>
<a href="https://cmake-tools.github.io/cmmm/">
<a href="https://cmake-tools.github.io/cmmm/pdf/cmmm.pdf">

```markdown
📖 PDF
Expand Down
3 changes: 2 additions & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ find_program(SPHINX_BUILD NAMES sphinx-build HINTS ENV CONDA_PREFIX DOC "sphinx-
add_custom_target(docs-html "${SPHINX_BUILD}" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/html" -b html -c "${CMAKE_CURRENT_BINARY_DIR}" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/conf.py"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Generating doc using Sphinx (html).")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" DESTINATION share/doc)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" DESTINATION "share/doc")

find_package(LATEX COMPONENTS LUALATEX)
if(LATEX_LUALATEX_FOUND)
Expand All @@ -27,6 +27,7 @@ if(LATEX_LUALATEX_FOUND)
DEPENDS docs-pdf docs-html docs-generate-pdf
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Generating doc using Sphinx (all).")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pdf/cmmm.pdf" DESTINATION "share/doc/pdf")
else()
add_custom_target(docs-all ALL DEPENDS docs-html
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ html_theme = 'classic'
html_theme_options = {}
html_static_path = ['static']
html_show_sourcelink = False
html_show_sphinx = False
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Welcome to CMMM's documentation!
================================
CMake Module Manager
====================

Table of Contents
^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 1f3e3c1

Please sign in to comment.