summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindChocolatey.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindChocolatey.cmake')
-rw-r--r--cmake/modules/FindChocolatey.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/modules/FindChocolatey.cmake b/cmake/modules/FindChocolatey.cmake
new file mode 100644
index 0000000..81510e1
--- /dev/null
+++ b/cmake/modules/FindChocolatey.cmake
@@ -0,0 +1,22 @@
+# FindChocolatey
+# ----------
+#
+# This module looks for Chocolatey
+
+if(WIN32)
+ if(ENV{ChocolateyInstall})
+ set(_chocolateyinstall_bin "$ENV{ChocolateyInstall}/bin")
+ endif()
+
+ find_path(CHOCOLATEY_BIN_PATH
+ choco.exe
+ PATHS
+ ${_chocolateyinstall_bin}
+ "$ENV{ProgramData}/chocolatey/bin"
+ C:/Chocolatey/bin
+ DOC "Chocolatey binary path"
+ NO_DEFAULT_PATH
+ )
+
+ mark_as_advanced(CHOCOLATEY_BIN_PATH)
+endif()