You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
500 B
CMake

# usage:
# FetchContent_MakeAvailable(cpr)
# target_link_libraries(${PROJECT_NAME} PRIVATE cpr::cpr)
if (NOT DEFINED CPR_GIT_TAG)
message(FATAL_ERROR "CPR_GIT_TAG is not defined.\n see https://github.com/libcpr/cpr and grab a release tag.\n example: set(CPR_GIT_TAG 1.10.2)")
endif()
FetchContent_Declare(
cpr
GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG ${CPR_GIT_TAG}
)
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
print_git_tag(${CPR_GIT_TAG})