From afa7329622726e988fdf9d443362a6bf9f371815 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 1 Jul 2021 22:16:06 +0800 Subject: add missing if for lz4c --- build/cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index a7e563d..eea4be3 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -146,7 +146,9 @@ if (LZ4_BUILD_LEGACY_LZ4C) list(APPEND LZ4_PROGRAMS_BUILT lz4c) add_executable(lz4c ${LZ4_CLI_SOURCES}) set_target_properties(lz4c PROPERTIES COMPILE_DEFINITIONS "ENABLE_LZ4C_LEGACY_OPTIONS") - target_link_libraries(lz4c ${LZ4_LINK_LIBRARY}) + if (BUILD_STATIC_LIBS) + target_link_libraries(lz4c ${LZ4_LINK_LIBRARY}) + endif() endif() # Extra warning flags -- cgit v0.12