#1059737 cpp-httplib: CMake support

#1059737#5
Date:
2023-12-31 03:20:25 UTC
From:
To:
Dear Maintainer,

I'd like to use this library from CMake and I believe upstream has direct support for it.
Could you please include the CMake config files in the package ?

The typical way to import the library in CMake would be:

find_package(httplib)

But with the current Debian package I need to use the provided pkg-config:

find_package(PkgConfig)
pkg_search_module(httplib IMPORTED_TARGET cpp-httplib)

Thanks!

Regards,

#1059737#10
Date:
2024-01-02 17:01:59 UTC
From:
To:
Hi kiwixz, thanks for your report!

Il giorno dom 31 dic 2023 alle 04:20:25 +01:00:00, kiwixz
<kiwixz@outlook.com> ha scritto:

This has been discussed upstream already at
<https://github.com/yhirose/cpp-httplib/issues/1328>, and the main
issue is that to generate CMake Config files you need to build the
project with CMake. Why is it an issue? Because building with CMake
would not generate a pkg-config file, and not shipping a pkg-config
file would make the project unusable from Make, the Autotools, shell
scripts, Muon, etc.

As a workaround I'd recommend you to use this CMake Find Module that I
and another yuzu contributor (abouvier) wrote:
<https://github.com/yuzu-emu/yuzu/blob/cec91c5fd6986539dbb6b3be7665361bff980dfb/CMakeModules/Findhttplib.cmake>

I hope you now understand why this is a wontfix, at least for now!

Bye :)