mirror of
https://github.com/google/benchmark.git
synced 2025-01-13 21:30:14 +08:00
Optimized docs installation (#1225)
* Use GNUInstallDirs to install docs. Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org> * Added an option to disable docs installation. Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
c23a001252
commit
1bd8098d3d
@ -25,6 +25,7 @@ else()
|
|||||||
set(BENCHMARK_BUILD_32_BITS OFF CACHE BOOL "Build a 32 bit version of the library - unsupported when using MSVC)" FORCE)
|
set(BENCHMARK_BUILD_32_BITS OFF CACHE BOOL "Build a 32 bit version of the library - unsupported when using MSVC)" FORCE)
|
||||||
endif()
|
endif()
|
||||||
option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" ON)
|
option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" ON)
|
||||||
|
option(BENCHMARK_INSTALL_DOCS "Enable installation of documentation." ON)
|
||||||
|
|
||||||
# Allow unmet dependencies to be met using CMake's ExternalProject mechanics, which
|
# Allow unmet dependencies to be met using CMake's ExternalProject mechanics, which
|
||||||
# may require downloading the source code.
|
# may require downloading the source code.
|
||||||
|
@ -118,7 +118,9 @@ if (BENCHMARK_ENABLE_INSTALL)
|
|||||||
NAMESPACE "${namespace}"
|
NAMESPACE "${namespace}"
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
||||||
|
|
||||||
install(
|
if (BENCHMARK_INSTALL_DOCS)
|
||||||
DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
|
install(
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
|
||||||
|
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user