mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:29:00 +08:00
f4e370b968
* [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>
29 lines
853 B
Diff
29 lines
853 B
Diff
--- 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()
|