Skip to content

Commit

Permalink
Showcase CPM usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Pavelka committed Aug 8, 2023
1 parent e6ece26 commit 77f4d61
Show file tree
Hide file tree
Showing 4 changed files with 1,178 additions and 5 deletions.
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Header section

cmake_minimum_required(VERSION 3.22)
project(hello)

Expand All @@ -9,6 +11,8 @@ set(CMAKE_CXX_STANDARD 17)
# if available
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

# Source section

include_directories(${PROJECT_SOURCE_DIR}/include)

add_executable(hello
Expand All @@ -17,4 +21,17 @@ add_executable(hello
src/main.cpp
)

# Dependencies section

include(CPM.cmake)

CPMAddPackage(
NAME fmt
GIT_TAG 10.0.0
GITHUB_REPOSITORY fmtlib/fmt
)
target_link_libraries(${PROJECT_NAME} fmt::fmt)

# Tests section

add_subdirectory(tests)
Loading

0 comments on commit 77f4d61

Please sign in to comment.