summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/ui.py
AgeCommit message (Collapse)Author
2025-12-17Dependencies: Make use of the DependencyCandidate classDylan Baker
This makes the type checking more reasonable (including fixing an issue that newer mypy is pointing out to us), consolidating special cases, and improving code readability.
2025-12-17dependencies: stop passing "language" as a keyword argumentDylan Baker
It's allowed in the `DependencyKeywordArguments` TypeDict already, so we now have two sources of truth. Additionally, it's often populated by reading from that dict, so we're just doing useless work.
2025-12-17dependencies: Pass the `name` to `ExternalDependency` constructorDylan Baker
So we don't create a default name that is overwritten except in the case of appleframeworks. This allows for some cleanup, including deleting some initializers that were only setting the name.
2025-12-08dependencies/ui.py: Improve Vulkan detection on WindowsChun-wei Fan
There now exists a Windows Vulkan SDK for ARM64, and the latest Vulkan SDKs for x64 Windows also provides ARM64 libraries and binaries for cross-builds (and vice-versa). So, now we have the following in the Vulkan SDKs: * Bin-ARM64 and Lib-ARM64 in x64 Windows SDKs that contains ARM64 Vulkan binaries and libraries. * Bin-X64 and Lib-X64 in ARM64 Windows SDKs that contains x64 Vulkan binaries and libraries * SDKs after 1.4.x (or so) no longer ships 32-bit Windows binaries and libraries. This updates the Vulkan detection logic to account for these differences so that the correct library is picked up upon linking on Windows, especially when cross-compiling ARM64 binaries on x64 Windows, and vice versa, while maintaining compatibility with native and 32-bit builds.
2025-11-19compilers: Remove Environment parameter from Compiler.compute_intDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.has_headerDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.find_libraryDylan Baker
2025-10-29environment: move detection functions to envconfig.pyPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-20interpreter: port dependency modules to typed_kwargsDylan Baker
2025-10-20dependency: Use a TypedDict to describe the keyword arguments to DependencyDylan Baker
This allows us to check that all of the keyword arguments are of the correct type.
2025-10-20vulkan: Fix Vulkan detection when cross-compiling to WindowsGodvin Ouseph
2025-05-23vulkan: Extract Vulkan version in SDK pathArjan Molenaar
This change ensures that Vulkan will be found in the path defined by the VULKAN_SDK env var. This is the case when the Vulkan SDK is not installed in a well-known location (/usr, /usr/local), but in a user's home folder.
2025-05-23vulkan: Make VK_SDK_PATH optionalArjan Molenaar
VULKAN_SDK is the preferred environment variable to point to the Vulkan installation. With this change the old variable (VK_SDK_PATH) is made optional.
2025-01-13vulkan system dep: determine version on cross buildsFlorian "sp1rit"​
Currently, the vulkan system dep detects its vulkan version by building and running: int main() { printf("%i.%i.%i", VK_VERSION_MAJOR(VK_HEADER_VERSION_COMPLETE), VK_VERSION_MINOR(VK_HEADER_VERSION_COMPLETE), VK_VERSION_PATCH(VK_HEADER_VERSION_COMPLETE)); return 0; } this causes cross builds that do not have the possibility of running on the build machine to evaluate the vulkan dependency with an 'Unknown' version. Instead of evaluating beforementioned piece of C code, the new implementation will instead use cc.compute_int to evaluate the three preprocessor macros. This is relativly expensive for cross builds right now but further optimizations can be made. See #13910 for more details.
2024-12-16dependencies: support old vulkan SDK versionVíctor Manuel Jáquez Leal
In old versions of Vulkan SDK, VK_SDK_PATH environment variable was used instead of VULKAN_SDK. This patch check both environment variables is fallback mode.
2024-10-04programs: Allow excluding certain paths when searching in PATHNirbheek Chauhan
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-08-08Detect version for Vulkan system dependencyLucas Alber
2023-06-26dependencies: switch the delayed-import mechanism for custom dependenciesEli Schwartz
Simply store the module it is expected to be found in. That module then appends to the packages dict, which guarantees mypy can verify that it's got the right type -- there is no casting needed.
2023-04-24dependencies: allow to fallback on CMake to find the SDL2 libraryMatthieu Bouron
On Windows, the SDL2 library is generally provided with only CMake config files. This commit allows meson to fallback on CMake as a last resort to find the SDL2 library.
2023-03-24Add a system method for obtaining GL dependency on Linux OSHelen Ginn
2023-02-01treewide: add future annotations importEli Schwartz
2022-09-12dependencies: simplify logging methodsEli Schwartz
A bunch of SystemDependency subclasses overrode log_tried() even though they used the same function anyway. Delete them -- they still print the same thing either way.
2022-02-14Add wx-config-3.1 provided by mingw-w64-x86_64-wxmsw3.1apoorv569
On Windows using MSYS2 MinGW installing the package `mingw-w64-x86_64-wxmsw3.1` provides `wx-config-3.1`. I have tried building my software by making this exact change and it build correctly.
2021-07-13dependencies: drop Dependency.methods and Dependency.get_methods()Dylan Baker
Both of these are artifacts of the time before Dependency Factories, when a dependency that could be discovered multiple ways did ugly stuff like finding a specific dependency, then replacing it's own attributes with that dependency's attributes. We don't have cases of that left in the tree, so let's get rid of this code too
2021-06-17move base class for system dependencies into base.pyEli Schwartz
In accordance with review comments; it's small enough this seems fitting.
2021-06-14dependencies: Use a typing.NewType for Dependency.type_nameDylan Baker
This allow mypy to catch cases where we accidently assign the dependency name to the type_name, as it sees them as having different types (though at runtime they're all strings).
2021-06-14dependencies: Use the SystemDependencyDylan Baker
This fixes these dependencies, which currently return the name of the dependency as the type. Fixes #8877
2021-06-09typing: Fully annotate dependenciesDaniel Mensinger
2021-06-03deps: Split dependencies.baseDaniel Mensinger
Split the Factory and dependency classes out of the base.py script to improve maintainability.
2021-03-22dependencies: split qt out of the ui moduleDylan Baker
It's a big enough and complicated enough bit of code that it deserves its own module.
2021-03-19split program related classes and functions out of dependenciesDylan Baker
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz
performed by running "pyupgrade --py36-plus" and committing the results
2021-02-07Add Qt6 moduleLuca Weiss
2021-01-04Use a single coredata dictionary for optionsDylan Baker
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2020-10-30qt: dependency: Strip tool versions from newlinesLaurent Pinchart
When finding the Qt compilation tools (moc, uic, rcc, lrelease), the version strings contain a trailing newline character. This results in a stray newline in the meson log: Detecting Qt5 tools Program /usr/lib64/qt5/bin/moc found: YES 5.14.2 (/usr/lib64/qt5/bin/moc) Program /usr/lib64/qt5/bin/uic found: YES 5.14.2 (/usr/lib64/qt5/bin/uic) Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2 (/usr/lib64/qt5/bin/rcc) Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2 (/usr/lib64/qt5/bin/lrelease) Strip the version to avoid this, resulting in a cleaner log: Detecting Qt5 tools Program /usr/lib64/qt5/bin/moc found: YES 5.14.2 (/usr/lib64/qt5/bin/moc) Program /usr/lib64/qt5/bin/uic found: YES 5.14.2 (/usr/lib64/qt5/bin/uic) Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2 (/usr/lib64/qt5/bin/rcc) Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2 (/usr/lib64/qt5/bin/lrelease) Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-07qt dependency: do not require all the tools automaticallyEli Schwartz
The compilers_detect function is only used in the qt module, which checks every time before using a specific compiler, if it is found. e.g. meson.build:10:6: ERROR: MOC sources specified and couldn't find moc-qt5, please check your qt5 installation In fact, the current check means we never even hit this error to begin with, because we previously died on the uninformative error: meson.build:10:6: ERROR: Program(s) ['moc'] not found or not executable which doesn't actually tell the user why this matters, and is all around a waste of time. Fixes #5582
2020-07-04qt: Fix has_tools() when required=FalseXavier Claessens
Improve logs by making it clear when the program is found but has wrong version.
2020-06-12dependencies: Split search_tool out of ExternalDependencyDylan Baker
it really doesn't make sense to put this in the ExternalDependency class. It doesn't rely on any of the state of that class, and it's generically useful inside meson.
2020-06-10dependencies: Remove finish_init methodDylan Baker
This is a holdover from before we had the DependencyFactory. It should have already been refactored into the initializer, but wasn't for some reason.
2020-05-14ui/qt: Warn if Android cpu_family is unknownNirbheek Chauhan
2020-05-14ui/qt: use new directory layout for qt on androidMatthew Waters
Now follows ios and other platform directory layouts. Moves from separate android_$arch directories to every library containing a _$arch suffix. e.g. libQt5Core_x86.a in a single directory.
2020-04-05qt dependency: Pick debug libraries based on b_vscrtCerbero
`b_vscrt` has existed forever, and is the canonical source for which CRT to link to, and hence whether to use the debug libraries or not.
2020-03-19dependencies/base: Make the ConfigTool Dependency more flexibleDylan Baker
2020-02-05depdenencies/qt: Second attempt to allow qt --no-framework on MacOS.nikolayp
Sometimes qt can be installed not as framework on MacOS. One way to achieve this behaviour is to use conan package manager. Allow falling back to simple library search if framework was not found. In addition, allow to find the debug version of qt debug libraries which have "_debug" suffix added to them. Fixes #5091
2020-02-05dependencies/ui: Honor static argument with wxwidgetsDylan Baker
Fixes #6564
2020-02-05dependencies/ui: Add type annotations to WxDependencyDylan Baker
2020-02-05dependencies/ui: wxwidgets requires C++Dylan Baker
so set the language field appropriately
2020-01-30Qt5: Do not use system qmake if not specified in cross fileXavier Claessens
There is a comment saying we do it because we used to do it. But it's wrong and lead to using system library when cross compiling. Factor out the code we use to find pkg-config, because it is the same use-case.