File tree 1 file changed +21
-13
lines changed
1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change 35
35
# set(CPM_DOWNLOAD_VERSION 0.40.2) set(CPM_HASH_SUM
36
36
# "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d")
37
37
38
- if (CPM_SOURCE_CACHE)
39
- set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
40
- elseif (DEFINED ENV{CPM_SOURCE_CACHE})
41
- set (CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
42
- else ()
43
- set (CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR} /cmake/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
38
+ if (NOT DEFINED CPM_DOWNLOAD_LOCATION AND NOT DEFINED ENV{CPM_DOWNLOAD_LOCATION})
39
+ if (CPM_SOURCE_CACHE)
40
+ set (CPM_DOWNLOAD_LOCATION
41
+ "${CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
42
+ elseif (DEFINED ENV{CPM_SOURCE_CACHE})
43
+ set (CPM_DOWNLOAD_LOCATION
44
+ "$ENV{CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
45
+ else ()
46
+ set (CPM_DOWNLOAD_LOCATION
47
+ "${CMAKE_BINARY_DIR} /cmake/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
48
+ endif ()
49
+
50
+ # Expand relative path. This is important if the provided path contains a
51
+ # tilde (~)
52
+ get_filename_component (CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION}
53
+ ABSOLUTE )
54
+
55
+ file (DOWNLOAD
56
+ https://raw.githubusercontent.com/Arniiiii/CPM.cmake/main/cmake/CPM.cmake
57
+ ${CPM_DOWNLOAD_LOCATION} # EXPECTED_HASH SHA256=${CPM_HASH_SUM}
58
+ )
44
59
endif ()
45
60
46
- # Expand relative path. This is important if the provided path contains a tilde (~)
47
- get_filename_component (CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE )
48
-
49
- file (DOWNLOAD https://raw.githubusercontent.com/Arniiiii/CPM.cmake/main/cmake/CPM.cmake
50
- ${CPM_DOWNLOAD_LOCATION} # EXPECTED_HASH SHA256=${CPM_HASH_SUM}
51
- )
52
-
53
61
include (${CPM_DOWNLOAD_LOCATION} )
You can’t perform that action at this time.
0 commit comments