diff --git a/README.md b/README.md index 43acc3a5..1ac6b297 100644 --- a/README.md +++ b/README.md @@ -397,12 +397,7 @@ 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") ) ``` @@ -431,22 +426,14 @@ 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 - OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES" +CPMAddPackage("gh:jarro2783/cxxopts@2.2.1" OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES" ) ``` ### [google/benchmark](https://github.com/google/benchmark) ```cmake -CPMAddPackage( - NAME benchmark - GITHUB_REPOSITORY google/benchmark - VERSION 1.5.2 - OPTIONS "BENCHMARK_ENABLE_TESTING Off" -) +CPMAddPackage("gh:google/benchmark@1.5.2" OPTIONS "BENCHMARK_ENABLE_TESTING Off") if(benchmark_ADDED) # enable c++11 to avoid compilation errors @@ -457,12 +444,7 @@ endif() ### [Lua](https://www.lua.org) ```cmake -CPMAddPackage( - NAME lua - GIT_REPOSITORY https://github.com/lua/lua.git - VERSION 5.3.5 - DOWNLOAD_ONLY YES -) +CPMAddPackage("gh:lua/lua@5.3.5" DOWNLOAD_ONLY YES) if (lua_ADDED) # lua has no CMake support, so we create our own target