mirror of https://github.com/microsoft/vcpkg.git
[librdkafka] fix find_dependency LZ4. (#23815)
* [librdkafka] fix find_dependency LZ4. Include `FindLZ4.cmake` will result following error message: ``` CMake Warning (dev) at /usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (LZ4) does not match the name of the calling package (RdKafka). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. ``` * [librdkafka] update port-version. * Prepend and restore cmake module path. * Update version database * Update ports/librdkafka/portfile.cmake * use the lz4 config files Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
parent
e79aaaaf3c
commit
f4e370b968
|
|
@ -0,0 +1,28 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -152,7 +152,7 @@ # LZ4 {
|
||||
option(ENABLE_LZ4_EXT "Enable external LZ4 library support" ON)
|
||||
set(WITH_LZ4_EXT OFF)
|
||||
-if(ENABLE_LZ4_EXT)
|
||||
- find_package(LZ4)
|
||||
- if(LZ4_FOUND)
|
||||
+if(1)
|
||||
+ find_package(lz4 CONFIG REQUIRED)
|
||||
+ if(1)
|
||||
set(WITH_LZ4_EXT ON)
|
||||
list(APPEND BUILT_WITH "LZ4_EXT")
|
||||
@@ -248,4 +248,4 @@ # LZ4 {
|
||||
install(
|
||||
- FILES "${project_config}" "${project_version}" "packaging/cmake/Modules/FindLZ4.cmake"
|
||||
+ FILES "${project_config}" "${project_version}"
|
||||
DESTINATION "${config_install_dir}"
|
||||
)
|
||||
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -241,4 +241,3 @@
|
||||
if(WITH_LZ4_EXT)
|
||||
- target_include_directories(rdkafka PRIVATE ${LZ4_INCLUDE_DIRS})
|
||||
- target_link_libraries(rdkafka PUBLIC LZ4::LZ4)
|
||||
+ target_link_libraries(rdkafka PUBLIC lz4::lz4)
|
||||
endif()
|
||||
|
|
@ -4,13 +4,13 @@ vcpkg_from_github(
|
|||
REF v1.8.2
|
||||
SHA512 8c8ae291129b78e3b8367307ad1b1715af1438cd76d7160d64d13a58adf84c7c9f51efeba4656f55e101c25e4cb744db0d8bb5c01a2decb229e4567d16bdcb22
|
||||
HEAD_REF master
|
||||
PATCHES lz4.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
lz4 ENABLE_LZ4_EXT
|
||||
ssl WITH_SSL
|
||||
zlib WITH_ZLIB
|
||||
zstd WITH_ZSTD
|
||||
|
|
@ -48,14 +48,6 @@ vcpkg_cmake_config_fixup(
|
|||
CONFIG_PATH lib/cmake/RdKafka
|
||||
)
|
||||
|
||||
if("lz4" IN_LIST FEATURES)
|
||||
vcpkg_replace_string(
|
||||
"${CURRENT_PACKAGES_DIR}/share/rdkafka/RdKafkaConfig.cmake"
|
||||
"find_dependency(LZ4)"
|
||||
"include(\"\${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake\")\n find_dependency(LZ4)"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"name": "librdkafka",
|
||||
"version": "1.8.2",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "The Apache Kafka C/C++ library",
|
||||
"homepage": "https://github.com/edenhill/librdkafka",
|
||||
"license": null,
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"lz4",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
|
|
@ -17,12 +18,6 @@
|
|||
}
|
||||
],
|
||||
"features": {
|
||||
"lz4": {
|
||||
"description": "Enable external LZ4 library support",
|
||||
"dependencies": [
|
||||
"lz4"
|
||||
]
|
||||
},
|
||||
"snappy": {
|
||||
"description": "Build with snappy"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3910,7 +3910,7 @@
|
|||
},
|
||||
"librdkafka": {
|
||||
"baseline": "1.8.2",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"libressl": {
|
||||
"baseline": "3.4.2",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0583e5dcb6a79a29685250e2b43ca1cd2a798d96",
|
||||
"version": "1.8.2",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "2f7a6da2edf664e544914466d1cc8994d1ea475a",
|
||||
"version": "1.8.2",
|
||||
|
|
|
|||
Loading…
Reference in New Issue