From 121efaf6734951016221edd9b74e62fd226bf309 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Mon, 11 Mar 2024 09:28:18 +0100 Subject: [PATCH] fix: use shorthand syntax in examples --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 33fbbc89..349c25b9 100644 --- a/README.md +++ b/README.md @@ -403,12 +403,8 @@ CPMAddPackage("gh:jbeder/yaml-cpp#yaml-cpp-0.6.3@0.6.3") ### [nlohmann/json](https://github.com/nlohmann/json) ```cmake -CPMAddPackage( - NAME nlohmann_json - VERSION 3.9.1 - GITHUB_REPOSITORY nlohmann/json - OPTIONS - "JSON_BuildTests OFF" +CPMAddPackage("gh:nlohmann/json@3.9.1" + OPTIONS "JSON_BuildTests OFF" ) ``` @@ -438,8 +434,7 @@ For a working example of using CPM to download and configure the Boost C++ Libra ```cmake # the install option has to be explicitly set to allow installation CPMAddPackage( - GITHUB_REPOSITORY jarro2783/cxxopts - VERSION 2.2.1 + URI "gh:jarro2783/cxxopts@2.2.1" OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES" ) ``` @@ -448,9 +443,7 @@ CPMAddPackage( ```cmake CPMAddPackage( - NAME benchmark - GITHUB_REPOSITORY google/benchmark - VERSION 1.5.2 + URI "gh:google/benchmark@1.5.2" OPTIONS "BENCHMARK_ENABLE_TESTING Off" ) @@ -464,9 +457,7 @@ endif() ```cmake CPMAddPackage( - NAME lua - GIT_REPOSITORY https://github.com/lua/lua.git - VERSION 5.3.5 + URI "gh:lua/lua@5.3.5" DOWNLOAD_ONLY YES )