Subject: [bug#71897] [PATCH v10 6/9] gnu: Add cpm-cmake.

From: dan <[email-masked]>
Date: Mon, 23 Sep 2024 07:04:05 +0800

* gnu/packages/cmake.scm (cpm-cmake): New variable.

Change-Id: I3938f1da1513010c8af6bedc2aa26635d43ca7ce
---
 gnu/packages/cmake.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 0a9e5ba907..4466c4b91d 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <[email-masked]>
 ;;; Copyright © 2021 Ricardo Wurmus <[email-masked]>
 ;;; Copyright © 2024 John Kehayias <[email-masked]>
+;;; Copyright © 2024 dan <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages cmake)
   #:use-module (guix deprecation)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
   #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
   #:use-module (gnu packages)
@@ -520,3 +522,26 @@ (define-public tinycmmc
     (description "The tinycmmc package contains a small collection of reusable
 CMake modules.")
     (license license:zlib)))
+
+(define-public cpm-cmake
+  (package
+    (name "cpm-cmake")
+    (version "0.38.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/cpm-cmake/CPM.cmake")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qbbhdq6cz2y7qfyy1k11i98d13s229r3phd5y3n5maq51ky8bgb"))))
+    (build-system copy-build-system)
+    (arguments
+     (list
+      #:install-plan #~'(("cmake/CPM.cmake" "lib/cmake/CPM.cmake"))))
+    (home-page "https://github.com/cpm-cmake/CPM.cmake")
+    (synopsis "Package manager for CMake")
+    (description "CPM.cmake is a cross-platform CMake script that adds
+dependency management capabilities to CMake.")
+    (license license:expat)))
-- 
2.45.2