Skip to content

Commit c2d1bbe

Browse files
authored
Merge pull request #80 from codecrafters-io/include-zlib-in-cpp-starter-code
CC-1319 include zlib in cpp starter code
2 parents 01624ac + 2be9fa5 commit c2d1bbe

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

compiled_starters/cpp/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ set(CMAKE_CXX_STANDARD 23) # Enable the C++23 standard
88
set(THREADS_PREFER_PTHREAD_FLAG ON)
99

1010
find_package(Threads REQUIRED)
11+
find_package(ZLIB REQUIRED)
1112

1213
add_executable(server ${SOURCE_FILES})
1314

14-
target_link_libraries(server PRIVATE Threads::Threads)
15+
target_link_libraries(server PRIVATE Threads::Threads ZLIB::ZLIB)

compiled_starters/cpp/vcpkg.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": [
3-
"pthreads"
3+
"pthreads",
4+
"zlib"
45
]
5-
}
6+
}

solutions/cpp/01-at4/code/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ set(CMAKE_CXX_STANDARD 23) # Enable the C++23 standard
88
set(THREADS_PREFER_PTHREAD_FLAG ON)
99

1010
find_package(Threads REQUIRED)
11+
find_package(ZLIB REQUIRED)
1112

1213
add_executable(server ${SOURCE_FILES})
1314

14-
target_link_libraries(server PRIVATE Threads::Threads)
15+
target_link_libraries(server PRIVATE Threads::Threads ZLIB::ZLIB)

solutions/cpp/01-at4/code/vcpkg.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": [
3-
"pthreads"
3+
"pthreads",
4+
"zlib"
45
]
5-
}
6+
}

starter_templates/cpp/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ set(CMAKE_CXX_STANDARD 23) # Enable the C++23 standard
88
set(THREADS_PREFER_PTHREAD_FLAG ON)
99

1010
find_package(Threads REQUIRED)
11+
find_package(ZLIB REQUIRED)
1112

1213
add_executable(server ${SOURCE_FILES})
1314

14-
target_link_libraries(server PRIVATE Threads::Threads)
15+
target_link_libraries(server PRIVATE Threads::Threads ZLIB::ZLIB)

starter_templates/cpp/vcpkg.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": [
3-
"pthreads"
3+
"pthreads",
4+
"zlib"
45
]
5-
}
6+
}

0 commit comments

Comments
 (0)