mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
0bbae498c9
In commit9a9a262ea1we moved from pkg-config to find_package() to work around a deficiency in the pkgsrc package manager, which does not ship pkg-config files as intended by CPython. Modern CMake discourages use of "FOO_LIBRARIES" in all cases, when imported "interface" libraries can and should be used instead. The meson equivalent is `dependency()` versus `cc.find_library()`, so this is certainly a general trend among modern build systems. An imported interface target, such as the previous PkgConfig::PYTHON, carries with it the various internal properties such as DEFINITIONS, INCLUDE_DIRS, or LIBRARIES, and batch applies them. It also avoids leaking across cmake 2.x style whole-directory scopes. Use the documented cmake imported interface target for embedding Python and avoid `add_definitions(${Python_DEFINITIONS})` and similar. As a bonus, it's also shorter and more concise. Fixes:9a9a262ea1Fixes: https://github.com/weechat/weechat/pull/2251 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>