Il giorno lun 26 dic 2022 alle 08:37:51 +02:00:00, Peter Pentchev
<r...@ringlet.net> ha scritto:
In #1020403 there is a request to install the CMake build glue for
the zstd library in its -dev package. I think that this is a good
idea, and I have a pretty much ready-for-uploading set of changes
that do that. For the purposes of this discussion I have uploaded
the proposed "switch to CMake and install the CMake build glue"
commits to my own fork of the libzstd repository
Hi Peter. Apart from your bootstrapping concerns, please keep in mind
that upstream's CMake build script is not official; citing the README:
> make is the officially maintained build system of this project. All
other build systems are "compatible" and 3rd-party maintained, they may
feature small differences in advanced options. When your system allows
it, prefer using make to build zstd and libzstd.
Using CMake instead of make has caused some interesting issues in the
past. The first that comes to my mind happened in Arch Linux, and got
featured on the Phoronix news site:
<https://www.phoronix.com/news/Arch-Linux-Bizarre-Zstd>
Since the make build generates a pkg-config file, you could look into
leveraging that instead. You could either send a patch to the CMake
projects using libzstd adding a Find module which calls
pkg_search_module(), as mentioned in #1020403, or patch zstd's
makefiles to install a small Find module itself (this is not really a
good practice, as ideally upstreams should install CMake Config files,
but should work nonetheless). Alternatively, you could even submit a
patch to CMake adding The Find module there; CMake already ships a lot
of them.