Skip to content

Commit

Permalink
Add config option to skip installing docs
Browse files Browse the repository at this point in the history
To save having to install and run Sphinx if you don't need the docs.
  • Loading branch information
Ortham committed Apr 27, 2024
1 parent f8130c8 commit 4f3e234
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Expand Up @@ -9,6 +9,7 @@ include(FetchContent)
option(BUILD_SHARED_LIBS "Build a shared library" ON)
option(RUN_CLANG_TIDY "Whether or not to run clang-tidy during build. Has no effect when using CMake's MSVC generator." OFF)
option(LIBLOOT_BUILD_TESTS "Whether or not to build libloot's tests." ON)
option(LIBLOOT_INSTALL_DOCS "Whether or not to install libloot's docs (which need to be built separately)." ON)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -406,8 +407,10 @@ endif()
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include"
DESTINATION ".")

install(DIRECTORY "${CMAKE_BINARY_DIR}/docs/html/"
DESTINATION "docs")
if(LIBLOOT_INSTALL_DOCS)
install(DIRECTORY "${CMAKE_BINARY_DIR}/docs/html/"
DESTINATION "docs")
endif()

########################################
# CPack
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -52,6 +52,7 @@ Parameter | Values | Default |Description
----------|--------|---------|-----------
`BUILD_SHARED_LIBS` | `ON`, `OFF` | `ON` | Whether or not to build a shared libloot binary.
`LIBLOOT_BUILD_TESTS` | `ON`, `OFF` | `ON` | Whether or not to build LOOT's tests.
`LIBLOOT_INSTALL_DOCS` | `ON`, `OFF` | `ON` | Whether or not to install libloot's docs (which need to be built separately).
`RUN_CLANG_TIDY` | `ON`, `OFF` | `OFF` | Whether or not to run clang-tidy during build. Has no effect when using CMake's MSVC generator.
`ESPLUGIN_URL` | A URL | A GitHub release archive URL | The URL to get a source code archive from. This can be used to supply a local path if the archive has already been downloaded (e.g. for offline builds).
`LIBLOADORDER_URL` | A URL | A GitHub release archive URL | The URL to get a source code archive from. This can be used to supply a local path if the archive has already been downloaded (e.g. for offline builds).
Expand Down

0 comments on commit 4f3e234

Please sign in to comment.