๐ ๏ธ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.18) | |
| project(cpm_example) | |
| set(CMAKE_CXX_STANDARD 17) | |
| set(CPM_DOWNLOAD_VERSION 0.27.2) | |
| set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | |
| if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target_link_libraries(cpm_example | |
| spdlog) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CPMAddPackage( | |
| NAME spdlog | |
| GITHUB_REPOSITORY gabime/spdlog | |
| VERSION 1.7.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set(CPM_DOWNLOAD_VERSION 0.27.2) | |
| set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | |
| if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) | |
| message(STATUS "Downloading CPM.cmake") | |
| file(DOWNLOAD https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) | |
| endif() | |
| include(${CPM_DOWNLOAD_LOCATION}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.18) | |
| project(cpm_example) | |
| set(CMAKE_CXX_STANDARD 17) | |
| add_executable(cpm_example src/main.cpp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CPMAddPackage( | |
| NAME nlohmann_json | |
| GITHUB_REPOSITORY nlohmann/json | |
| VERSION 3.6.1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CPMAddPackage( | |
| NAME nlohmann_json | |
| VERSION 3.6.1 | |
| URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip | |
| URL_HASH SHA256=69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf) | |
| if(nlohmann_json_ADDED) | |
| add_library(nlohmann_json INTERFACE) | |
| target_include_directories(nlohmann_json INTERFACE ${nlohmann_json_SOURCE_DIR}) | |
| endif() |
NewerOlder