When taking library dependencies from CMake, we first attempt to look the dependency up in the target list, then fall back to treating it as a path, which we add if the path exists. As there is no check for whether or not the path is really a path, this can cause false positives; for example if a 'uuid' dependency was passed intending to be a target, but it cannot be found and the current directory also contains a file or directory named 'uuid', we will just include the string 'uuid' in library dependencies. This is particularly prevalent on Windows, where a system library called 'version' exists, and thanks to case insensitivity will match a file called 'VERSION' if found in the source root when running Meson from the source directory, or a generated file when running Meson from the build directory. Fix this check to only look up filesystem existence on absolute paths, not unqualified. This also adds a fallback warning in case an argument cannot be found, rather than silently falling back.pull/6980/head
parent
0f4e88b181
commit
f5f3805ce2
1 changed files with 5 additions and 1 deletions
Loading…
Reference in new issue