Last active
August 12, 2020 09:48
-
-
Save leozz37/d04b01add2b1e15742263cfc8bcadd3d to your computer and use it in GitHub Desktop.
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})) | |
| 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}) | |
| CPMAddPackage( | |
| NAME spdlog | |
| GITHUB_REPOSITORY gabime/spdlog | |
| VERSION 1.7.0) | |
| add_executable(cpm_example src/main.cpp) | |
| target_link_libraries(cpm_example | |
| spdlog) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment