-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dynamically links without warning, despite static
in config
#14427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just found that lowercasing SDL3 ( What could be the cause of the difference between |
CMake requires you to know the name of the cmake variable containing the dependency you want, and may export different cmake variables containing differently built dependencies. Using pkg-config we can check for both and use whatever is available, or warn if we see the wrong type. Using the cmake dependency finder we are reliant on quite a bit of guesswork and e.g. specifying the ... I think the difference in casing is because lowercase is the pkg-config name but uppercase is the |
That makes sense, thanks for the explanation. And yes, the pkg-config and CMake config do have that casing difference. I now see that this is documented here. When using the CMake dependency and manually specifying the components and modules, why doesn't this work?
This causes a bunch of linker errors due to cstdlib math functions not being found (
Notice the lack of |
Describe the bug
I have
dependency('SDL3', static: true)
, but the output is still dynamically linked to SDL3.To reproduce
meson.build
:main.c
:Commands:
Result:
Expected behavior
Meson either statically links SDL3 or throws an error.
The following
CMakeLists.txt
, for example, links correctly:Command:
Result:
system parameters
OS: Fedora
Python: 3.13.2
Meson: 1.5.1
Ninja: 1.12.1
The text was updated successfully, but these errors were encountered: