CMakeLists: Always use zstd::zstd, not just on Windows
This seems to be required in order to actually use the flags for the
copy of zstd found by the top-level CMakeLists. Without it, it seems to
blindly add -lzstd, which breaks the build for me since my copy of zstd
is not in the default library path.
Originally this used `zstd`, not `zstd::zstd`, on all platforms. Commit
2cbce77 ("CMakeLists: use system zstd on Linux") made it
platform-dependent: despite its title, it changed the behavior on
Windows to use `zstd::zstd`, while leaving the behavior on Linux
unchanged.
I'm pretty sure `zstd::zstd` is the right choice on all platforms, but
by accident `zstd` also works on Linux because the library happens to
(usually) be installed in /usr/lib.
This commit is contained in:
@@ -211,9 +211,4 @@ create_target_directory_groups(common)
|
||||
find_package(Boost 1.71 COMPONENTS context headers REQUIRED)
|
||||
|
||||
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile)
|
||||
target_link_libraries(common PRIVATE lz4::lz4 xbyak)
|
||||
if (MSVC)
|
||||
target_link_libraries(common PRIVATE zstd::zstd)
|
||||
else()
|
||||
target_link_libraries(common PRIVATE zstd)
|
||||
endif()
|
||||
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd xbyak)
|
||||
|
||||
Reference in New Issue
Block a user