mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
* apply clang-format and cmake-format and add style check workflow * add declare package definition * add additional public methods and rename internals * change development verison tag to 1.0.0 * rename internal method * rename public method * rename test var * update copyright and fix comment * typo * run fix-format * fix test function names
20 lines
708 B
CMake
20 lines
708 B
CMake
set(CPM_DOWNLOAD_VERSION 1.0.0-development-version)
|
|
|
|
if(CPM_SOURCE_CACHE)
|
|
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
|
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
else()
|
|
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
|
endif()
|
|
|
|
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
|
|
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
|
|
file(DOWNLOAD
|
|
https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
|
${CPM_DOWNLOAD_LOCATION}
|
|
)
|
|
endif()
|
|
|
|
include(${CPM_DOWNLOAD_LOCATION})
|