1# Copyright 2017 The Meson development team
2
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6
7#     http://www.apache.org/licenses/LICENSE-2.0
8
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15from .boost import BoostDependency
16from .cuda import CudaDependency
17from .hdf5 import HDF5Dependency
18from .base import (  # noqa: F401
19    Dependency, DependencyException, DependencyMethods, ExternalProgram, EmptyExternalProgram, NonExistingExternalProgram,
20    ExternalDependency, NotFoundDependency, ExternalLibrary, ExtraFrameworkDependency, InternalDependency,
21    PkgConfigDependency, CMakeDependency, find_external_dependency, get_dep_identifier, packages, _packages_accept_language,
22    DependencyFactory)
23from .dev import ValgrindDependency, gmock_factory, gtest_factory, llvm_factory, zlib_factory
24from .coarrays import coarray_factory
25from .mpi import mpi_factory
26from .scalapack import scalapack_factory
27from .misc import (
28    BlocksDependency, OpenMPDependency, cups_factory, curses_factory, gpgme_factory,
29    libgcrypt_factory, libwmf_factory, netcdf_factory, pcap_factory, python3_factory,
30    shaderc_factory, threads_factory,
31)
32from .platform import AppleFrameworks
33from .ui import GnuStepDependency, Qt4Dependency, Qt5Dependency, WxDependency, gl_factory, sdl2_factory, vulkan_factory
34
35
36# This is a dict where the keys should be strings, and the values must be one
37# of:
38# - An ExternalDependency subclass
39# - A DependencyFactory object
40# - A callable with a signature of (Environment, MachineChoice, Dict[str, Any]) -> List[Callable[[], DependencyType]]
41packages.update({
42    # From dev:
43    'gtest': gtest_factory,
44    'gmock': gmock_factory,
45    'llvm': llvm_factory,
46    'valgrind': ValgrindDependency,
47    'zlib': zlib_factory,
48
49    'boost': BoostDependency,
50    'cuda': CudaDependency,
51
52    # per-file
53    'coarray': coarray_factory,
54    'hdf5': HDF5Dependency,
55    'mpi': mpi_factory,
56    'scalapack': scalapack_factory,
57
58    # From misc:
59    'blocks': BlocksDependency,
60    'curses': curses_factory,
61    'netcdf': netcdf_factory,
62    'openmp': OpenMPDependency,
63    'python3': python3_factory,
64    'threads': threads_factory,
65    'pcap': pcap_factory,
66    'cups': cups_factory,
67    'libwmf': libwmf_factory,
68    'libgcrypt': libgcrypt_factory,
69    'gpgme': gpgme_factory,
70    'shaderc': shaderc_factory,
71
72    # From platform:
73    'appleframeworks': AppleFrameworks,
74
75    # From ui:
76    'gl': gl_factory,
77    'gnustep': GnuStepDependency,
78    'qt4': Qt4Dependency,
79    'qt5': Qt5Dependency,
80    'sdl2': sdl2_factory,
81    'wxwidgets': WxDependency,
82    'vulkan': vulkan_factory,
83})
84_packages_accept_language.update({
85    'hdf5',
86    'mpi',
87    'netcdf',
88    'openmp',
89})
90