this PR is another try to fix #435, #417, and #403
Different from #400 , this PR tries to find_package lz4 first, if found, include and link lz4, otherwise it falls back to PkgConfig. This is a more cmake friendly change, in my point of view.
This PR is based on the fact that, if lz4 is built and installed from source using cmake, it already has support of cmake, see code https://github.com/lz4/lz4/tree/dev/build/cmake. This PR does not add too much additional cmake script but use upstream of lz4's cmake support.
this PR is another try to fix #435, #417, and #403
Different from #400 , this PR tries to find_package
lz4
first, if found, include and linklz4
, otherwise it falls back toPkgConfig
. This is a more cmake friendly change, in my point of view.This PR is based on the fact that, if lz4 is built and installed from source using cmake, it already has support of cmake, see code https://github.com/lz4/lz4/tree/dev/build/cmake. This PR does not add too much additional cmake script but use upstream of
lz4
's cmake support.