File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: MIT
2+ #
3+ # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
4+
5+ set (CPM_DOWNLOAD_VERSION 0.40.0)
6+ set (CPM_HASH_SUM "7b354f3a5976c4626c876850c93944e52c83ec59a159ae5de5be7983f0e17a2a" )
7+
8+ if (CPM_SOURCE_CACHE)
9+ set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
10+ elseif (DEFINED ENV{CPM_SOURCE_CACHE})
11+ set (CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
12+ else ()
13+ set (CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR} /cmake/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
14+ endif ()
15+
16+ # Expand relative path. This is important if the provided path contains a tilde (~)
17+ get_filename_component (CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE )
18+
19+ file (DOWNLOAD
20+ https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION} /CPM.cmake
21+ ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
22+ )
23+
24+ include (${CPM_DOWNLOAD_LOCATION} )
You can’t perform that action at this time.
0 commit comments