]> git.ipfire.org Git - thirdparty/zstd.git/commit
build(cmake): improve pkg-config generation 3252/head
authorAndrea Pappacoda <andrea@pappacoda.it>
Sun, 28 Aug 2022 11:01:20 +0000 (13:01 +0200)
committerAndrea Pappacoda <andrea@pappacoda.it>
Sun, 28 Aug 2022 11:24:30 +0000 (13:24 +0200)
commita0b09d0ff735d34fd99029bb59ffff2874565b42
tree88c91a367e7d321d60d288e8c322e26d0bfecede
parent155d6a58a2a6290710194fd6367d720fca94a923
build(cmake): improve pkg-config generation

With this patch the pkg-config generation when using the CMake build
system is improved in the following ways:

- Libs.private is now filled when needed
- The JoinPaths module is now used to join paths, leading to simpler
  code
- The .pc file is always generated, regardless of the platform, as it
  can also be consumed on Windows

Here's how the .pc file is affected by these changes, in comparison to
the one generated with the official Makefiles:

    $ diff -s lib/libzstd.pc build/cmake/build-old/lib/libzstd.pc
    15c15
    < Libs.private: -pthread
    ---
    > Libs.private:

    $ diff -s lib/libzstd.pc build/cmake/build-new/lib/libzstd.pc
    Files lib/libzstd.pc and build/cmake/build-new/lib/libzstd.pc are
    identical
build/cmake/CMakeModules/JoinPaths.cmake [new file with mode: 0644]
build/cmake/lib/CMakeLists.txt