Skip to content

Commit

Permalink
feat build: use FindZLIB from CMake as it is available since 3.1
Browse files Browse the repository at this point in the history
Tests: протестировано локально и в CI
commit_hash:87167f87ffa5ae0e41ad1249ff4f515a9cf81261
  • Loading branch information
apolukhin committed Dec 26, 2024
1 parent d1f2439 commit 88ff58d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 26 deletions.
1 change: 0 additions & 1 deletion .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"cmake/modules/Findlibmariadb.cmake":"taxi/uservices/userver/cmake/modules/Findlibmariadb.cmake",
"cmake/modules/Findlibsnappy.cmake":"taxi/uservices/userver/cmake/modules/Findlibsnappy.cmake",
"cmake/modules/Findlibyamlcpp.cmake":"taxi/uservices/userver/cmake/modules/Findlibyamlcpp.cmake",
"cmake/modules/Findlibz.cmake":"taxi/uservices/userver/cmake/modules/Findlibz.cmake",
"cmake/modules/Findlibzip.cmake":"taxi/uservices/userver/cmake/modules/Findlibzip.cmake",
"cmake/modules/Findlibzstd.cmake":"taxi/uservices/userver/cmake/modules/Findlibzstd.cmake",
"cmake/modules/Findlz4.cmake":"taxi/uservices/userver/cmake/modules/Findlz4.cmake",
Expand Down
2 changes: 1 addition & 1 deletion cmake/SetupRdKafka.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(USERVER_KAFKA_VERSION "2.3.0")

find_package(OpenSSL COMPONENTS SSL Crypto REQUIRED)
find_package(CURL REQUIRED)
find_package(libz REQUIRED)
find_package(ZLIB REQUIRED)
find_package(libzstd REQUIRED)
find_package(lz4 REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion cmake/SetupRocksDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif()

find_package(libgflags REQUIRED)
find_package(libsnappy REQUIRED)
find_package(libz REQUIRED)
find_package(ZLIB REQUIRED)
find_package(libzip REQUIRED)
find_package(libzstd REQUIRED)

Expand Down
1 change: 0 additions & 1 deletion cmake/install/userver-kafka-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ find_package(userver REQUIRED COMPONENTS
core
)

include("${USERVER_CMAKE_DIR}/modules/Findlibz.cmake")
include("${USERVER_CMAKE_DIR}/modules/Findlz4.cmake")
include("${USERVER_CMAKE_DIR}/modules/FindRdKafka.cmake")

Expand Down
19 changes: 0 additions & 19 deletions cmake/modules/Findlibz.cmake

This file was deleted.

5 changes: 2 additions & 3 deletions kafka/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(userver-kafka CXX)
if(USERVER_CONAN)
find_package(OpenSSL COMPONENTS SSL Crypto REQUIRED)
find_package(CURL REQUIRED)
find_package(libz REQUIRED)
find_package(ZLIB REQUIRED)
find_package(RdKafka REQUIRED)
set_target_properties(RdKafka::rdkafka PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(RdKafka ALIAS RdKafka::rdkafka)
Expand All @@ -13,7 +13,7 @@ endif()

userver_module(kafka
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
LINK_LIBRARIES_PRIVATE RdKafka sasl2 libz libzstd lz4::lz4 CURL::libcurl OpenSSL::SSL OpenSSL::Crypto
LINK_LIBRARIES_PRIVATE RdKafka sasl2 ZLIB::ZLIB libzstd lz4::lz4 CURL::libcurl OpenSSL::SSL OpenSSL::Crypto
DBTEST_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests"
DBTEST_LINK_LIBRARIES userver::kafka-utest
DBTEST_DATABASES kafka
Expand All @@ -37,7 +37,6 @@ endif()
_userver_directory_install(COMPONENT kafka
FILES
"${USERVER_ROOT_DIR}/cmake/modules/FindRdKafka.cmake"
"${USERVER_ROOT_DIR}/cmake/modules/Findlibz.cmake"
"${USERVER_ROOT_DIR}/cmake/modules/Findlz4.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/userver/modules"
)
Expand Down

0 comments on commit 88ff58d

Please sign in to comment.