From 68240d315d7400d20c38c1e7ca5c010077897c3c Mon Sep 17 00:00:00 2001 From: Fedor Osetrov <33493672+fdr400@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:11:40 +0300 Subject: [PATCH] Fix check for LZ4::LZ4 target --- cmake/FindLZ4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake index 4a8c753029..45474c99a9 100644 --- a/cmake/FindLZ4.cmake +++ b/cmake/FindLZ4.cmake @@ -17,7 +17,7 @@ find_package_handle_standard_args(LZ4 DEFAULT_MSG LZ4_LIBRARIES LZ4_INCLUDE_DIRS mark_as_advanced(LZ4_LIBRARIES LZ4_INCLUDE_DIRS) -if(LZ4_FOUND AND NOT LZ4::LZ4) +if(LZ4_FOUND AND NOT TARGET LZ4::LZ4) add_library(LZ4::LZ4 UNKNOWN IMPORTED) set_target_properties( LZ4::LZ4 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIRS}"