Skip to content

Commit d124c77

Browse files
committed
Install FindPFM.cmake for bencmarkConfig.cmake
There is no upstream PFM cmake package config file to use, so this has to be installed for the benchmark cmake package config file to work. Bug: https://bugs.gentoo.org/950573 See-Also: c214639 Signed-off-by: Alfred Wingate <parona@protonmail.com>
1 parent ff5c94d commit d124c77

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cmake/Config.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include (CMakeFindDependencyMacro)
55
find_dependency (Threads)
66

77
if (@BENCHMARK_ENABLE_LIBPFM@)
8+
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
89
find_dependency (PFM)
910
endif()
1011

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ set_property(
3939
if (PFM_FOUND)
4040
target_link_libraries(benchmark PRIVATE PFM::libpfm)
4141
target_compile_definitions(benchmark PRIVATE -DHAVE_LIBPFM)
42+
install(
43+
FILES "${PROJECT_SOURCE_DIR}/cmake/Modules/FindPFM.cmake"
44+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
4245
endif()
4346

4447
# pthread affinity, if available

0 commit comments

Comments
 (0)