aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Imes <connor.k.imes@gmail.com>2020-11-08 12:24:51 -0500
committerConnor Imes <connor.k.imes@gmail.com>2020-11-08 12:24:51 -0500
commit07dc442d918a6bc2cf5cd2b086b79f2e00e3cb22 (patch)
treedd78e4b17f7e864da44ce46ee9f6bd4180ac2b31
parentf30258190ffa8bed448e6851f52ab5f4760437fe (diff)
CMakeLists: do not install experimental cmake helpers by default
This feature is not yet ready for public release
-rw-r--r--CMakeLists.txt12
-rw-r--r--RELEASES.md4
2 files changed, 8 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f97f8b..73c5deb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,13 +94,17 @@ write_basic_package_version_file(
# Install
+set(POWERCAP_CMAKE_CONFIG_INSTALL OFF CACHE BOOL "Install cmake package helpers (experimental)")
+
install(TARGETS powercap EXPORT PowercapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES inc/powercap.h inc/powercap-sysfs.h inc/powercap-rapl.h inc/powercap-rapl-sysfs.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install(DIRECTORY ${CMAKE_BINARY_DIR}/pkgconfig/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PowercapConfig.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/PowercapConfigVersion.cmake
- DESTINATION ${POWERCAP_CMAKE_CONFIG_DIR})
-install(EXPORT PowercapTargets FILE PowercapTargets.cmake DESTINATION ${POWERCAP_CMAKE_CONFIG_DIR})
+if(POWERCAP_CMAKE_CONFIG_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PowercapConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/PowercapConfigVersion.cmake
+ DESTINATION ${POWERCAP_CMAKE_CONFIG_DIR})
+ install(EXPORT PowercapTargets FILE PowercapTargets.cmake DESTINATION ${POWERCAP_CMAKE_CONFIG_DIR})
+endif()
# Uninstall
diff --git a/RELEASES.md b/RELEASES.md
index 5f9870c..ed2b83a 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -2,10 +2,6 @@
## [Unreleased]
-### Added
-
-* CMake helper to find powercap without using pkg-config
-
### Fixed
* [#6] powercap-common-test:test_snprintf_base_path fails on ppc64el architecture