Skip to content

Commit 7697796

Browse files
authored
2011: Installing contents from benchmark's tools/ subdirectory. (#2016)
* 2011: Installing contents from benchmark's tools/ subdirectory. * Incorporating feedback from the PR * Per PR feedback, removing guards to when setting CMAKE_INSTALL_PYTOOLSDIR
1 parent 1d58aeb commit 7697796

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ endif()
2929
option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" ON)
3030
option(BENCHMARK_ENABLE_DOXYGEN "Build documentation with Doxygen." OFF)
3131
option(BENCHMARK_INSTALL_DOCS "Enable installation of documentation." ON)
32+
option(BENCHMARK_INSTALL_TOOLS "Enable installation of tools." ON)
3233

3334
# Allow unmet dependencies to be met using CMake's ExternalProject mechanics, which
3435
# may require downloading the source code.

src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,11 @@ else()
194194
DESTINATION ${CMAKE_INSTALL_DOCDIR})
195195
endif()
196196
endif()
197+
198+
set(CMAKE_INSTALL_PYTOOLSDIR "${CMAKE_INSTALL_DATADIR}/googlebenchmark/tools" CACHE PATH "")
199+
200+
if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_TOOLS)
201+
install(
202+
DIRECTORY "${PROJECT_SOURCE_DIR}/tools/"
203+
DESTINATION ${CMAKE_INSTALL_PYTOOLSDIR})
204+
endif()

0 commit comments

Comments
 (0)