aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/cmake.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/dependencies/cmake.py')
-rw-r--r--mesonbuild/dependencies/cmake.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py
index a6898f8..dcbe5df 100644
--- a/mesonbuild/dependencies/cmake.py
+++ b/mesonbuild/dependencies/cmake.py
@@ -14,9 +14,9 @@
from .base import ExternalDependency, DependencyException, DependencyTypeName
from ..mesonlib import is_windows, MesonException, OptionKey, PerMachine, stringlistify, extract_as_list
-from ..mesondata import mesondata
from ..cmake import CMakeExecutor, CMakeTraceParser, CMakeException, CMakeToolchain, CMakeExecScope, check_cmake_args, CMakeTarget, resolve_cmake_trace_targets, cmake_is_debug
from .. import mlog
+import importlib.resources
from pathlib import Path
import functools
import re
@@ -583,7 +583,7 @@ class CMakeDependency(ExternalDependency):
shutil.rmtree(cmake_files.as_posix(), ignore_errors=True)
# Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt
- cmake_txt = mesondata['dependencies/data/' + cmake_file].data
+ cmake_txt = importlib.resources.read_text('mesonbuild.dependencies.data', cmake_file, encoding = 'utf-8')
# In general, some Fortran CMake find_package() also require C language enabled,
# even if nothing from C is directly used. An easy Fortran example that fails