-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dependencies and add usage comments
- Loading branch information
1 parent
22ddd61
commit f8b8d41
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# The MiniCppStarter | ||
# | ||
# Build and run by calling: | ||
# cmake -S. -Bbuild && cmake --build build && ./build/Playground | ||
|
||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR) | ||
|
||
# ---- Project ---- | ||
|
@@ -6,28 +11,28 @@ project(Playground LANGUAGES CXX) | |
|
||
# ---- Fetch CPM ---- | ||
|
||
set(CPM_DOWNLOAD_VERSION 0.27.2) | ||
set(CPM_DOWNLOAD_VERSION 0.32.0) | ||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
|
||
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) | ||
message(STATUS "Downloading CPM.cmake v${CPM_DOWNLOAD_VERSION}") | ||
file(DOWNLOAD https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) | ||
file(DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION}) | ||
endif() | ||
|
||
include(${CPM_DOWNLOAD_LOCATION}) | ||
|
||
# ---- Add dependencies via CPM ---- | ||
# See https://github.com/TheLartians/CPM.cmake for details and examples | ||
|
||
CPMAddPackage( | ||
NAME Greeter | ||
GITHUB_REPOSITORY TheLartians/ModernCppStarter | ||
VERSION 0.10 | ||
) | ||
# the ModernCppStarter defines an example project called 'Greeter' | ||
CPMAddPackage("gh:TheLartians/[email protected]") | ||
|
||
# ---- Create executable ---- | ||
|
||
# add your source files here | ||
add_executable(Playground main.cpp) | ||
|
||
set_target_properties(Playground PROPERTIES CXX_STANDARD 17) | ||
|
||
target_link_libraries(Playground Greeter) | ||
# link to your libraries' targets here | ||
target_link_libraries(Playground Greeter::Greeter) |
This file contains 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