Add config option to skip installing docs

To save having to install and run Sphinx if you don't need the docs.
This commit is contained in:
Oliver Hamlet
2024-04-28 15:18:02 +01:00
parent 69b0cee405
commit c652fcafe1
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -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)
@@ -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
+1
View File
@@ -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 libloot'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).