Skip to content

Conversation

@thrimbor
Copy link
Member

The last two commits are from #631, with only the commit title updated. They make it possible for CMake to find the libraries to link against via pkg-config.

These two commits had the problem that they fix CMake, but by doing so are breaking direct usage of nxdk-pkg-config (and probably meson) because the emitted linker arguments are in ld syntax, while we rely on the syntax of link.exe.

This PR circumvents this issue by switching from whatever pkg-config the host OS provides to explicitly requiring pkgconf (which is the default pkg-config implementation on Arch, Alpine and probably others anyway).
pkgconf provides a --msvc-syntax parameter that can be used to get the required link.exe-style linker parameters. This would add an additional .lib suffix to the library paths (resulting in things like libjpeg.lib.lib), so I added a small sed command to fix that.

@Ryzee119
Copy link
Contributor

Thanks, I tested this on a couple of my cmake projects. After adding the new dependency on pkgconf, all worked as expected

@Ryzee119 Ryzee119 merged commit 6d3be63 into XboxDev:master Jan 14, 2025
6 checks passed
@thrimbor thrimbor deleted the pkgconfig_changes branch January 17, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants