From 67666ce4bfeeb84e81c501847e2e4e336e8ba306 Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Tue, 11 Dec 2018 15:04:27 +0100
Subject: [PATCH] windows: add install helper

---
 windows/base/Profile.ps1 | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/windows/base/Profile.ps1 b/windows/base/Profile.ps1
index 1bdef09..ed9d871 100644
--- a/windows/base/Profile.ps1
+++ b/windows/base/Profile.ps1
@@ -36,7 +36,7 @@ function GitLab-Fetch-Artifacts {
 }
 
 #
-# Sets up a CMake package for find_package from a tarball
+# Sets up a CMake package for find_package from a tarball without copying
 #
 function CMake-Integrate-Package {
     $name = $args[0]
@@ -44,3 +44,14 @@ function CMake-Integrate-Package {
     7z x $name-*.tar; Remove-Item -Force $name-*.tar
     [Environment]::SetEnvironmentVariable("${name}_ROOT", "$(resolve-path $name-*)")
 }
+
+#
+# Sets up a CMake package for find_package from a tarball
+#
+function CMake-Install-Package {
+    $name = $args[0]
+    7z e $name-*.tar.xz; Remove-Item -Force $name-*.tar.xz
+    7z x $name-*.tar; Remove-Item -Force $name-*.tar
+    Copy-Item -Recurse $name-* "C:/Program Files/"
+    Remove-Item -Recurse -Force $name-*
+}
-- 
GitLab