mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 12: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)
|
||||
endif()
|
||||
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
|
||||
# may require downloading the source code.
|
||||
|
@ -118,7 +118,9 @@ if (BENCHMARK_ENABLE_INSTALL)
|
||||
NAMESPACE "${namespace}"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
||||
|
||||
install(
|
||||
DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
||||
if (BENCHMARK_INSTALL_DOCS)
|
||||
install(
|
||||
DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
|
||||
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user