Merge pull request #9054 from Docteh/just_lz4

CMake: Try add_library "lz4" if "lz4::lz4" is unavailable
This commit is contained in:
bunnei 2022-10-17 22:51:26 -07:00 committed by GitHub
commit 8649c46c74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,11 @@ endif()
create_target_directory_groups(common)
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
if (TARGET lz4::lz4)
target_link_libraries(common PRIVATE lz4::lz4)
else()
target_link_libraries(common PRIVATE LZ4::lz4_shared)
endif()
if (TARGET zstd::zstd)
target_link_libraries(common PRIVATE zstd::zstd)
else()