summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindChocolatey.cmake
blob: 81510e1628e2c62f5e2ebfd0c3f904a602896311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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()