aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/interpreter.py
diff options
context:
space:
mode:
authorgeorgev93 <georgeavogt93@gmail.com>2020-06-28 21:59:17 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-06-30 23:50:10 +0300
commit5acd8acd51859ab3189f43d6ba2fcd3e4b27518d (patch)
tree10c73d0a7390697ba263f9257f78a3225e6603ee /mesonbuild/cmake/interpreter.py
parent4a371c97f422d0dc68fece2fe56d544ccd6558e9 (diff)
downloadmeson-5acd8acd51859ab3189f43d6ba2fcd3e4b27518d.zip
meson-5acd8acd51859ab3189f43d6ba2fcd3e4b27518d.tar.gz
meson-5acd8acd51859ab3189f43d6ba2fcd3e4b27518d.tar.bz2
Move mesonbuild/cmake/data/run_ctgt.py to mesonbuild/scripts/cmake_run_ctgt.py, as well as enclose everything in a run() function so it can be called by `meson --internal cmake_run_ctgt ...`. Also, include mesonbuild/cmake/data/ in the msi package.
Diffstat (limited to 'mesonbuild/cmake/interpreter.py')
-rw-r--r--mesonbuild/cmake/interpreter.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index d5ec0a7..2857527 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -22,7 +22,7 @@ from .client import CMakeClient, RequestCMakeInputs, RequestConfigure, RequestCo
from .fileapi import CMakeFileAPI
from .executor import CMakeExecutor
from .traceparser import CMakeTraceParser, CMakeGeneratorTarget
-from .. import mlog
+from .. import mlog, mesonlib
from ..environment import Environment
from ..mesonlib import MachineChoice, OrderedSet, version_compare
from ..compilers.compilers import lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header
@@ -1059,9 +1059,6 @@ class CMakeInterpreter:
root_cb.lines += [function('project', [self.project_name] + self.languages)]
# Add the run script for custom commands
- run_script = pkg_resources.resource_filename('mesonbuild', 'cmake/data/run_ctgt.py')
- run_script_var = 'ctgt_run_script'
- root_cb.lines += [assign(run_script_var, function('find_program', [[run_script]], {'required': True}))]
# Add the targets
processing = []
@@ -1243,7 +1240,8 @@ class CMakeInterpreter:
# Generate the command list
command = []
- command += [id_node(run_script_var)]
+ command += mesonlib.meson_command
+ command += ['--internal', 'cmake_run_ctgt']
command += ['-o', '@OUTPUT@']
if tgt.original_outputs:
command += ['-O'] + tgt.original_outputs