aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-03-13 19:38:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-03-13 19:38:53 +0200
commit96839e58938a5c43cf742785378ea9a20e6390ec (patch)
tree42ada95d26ac8933175249a7c8aed19d2922d090 /modules
parentd6ef93434ea94be79af792d81c4ea273a408dc6c (diff)
downloadmeson-96839e58938a5c43cf742785378ea9a20e6390ec.zip
meson-96839e58938a5c43cf742785378ea9a20e6390ec.tar.gz
meson-96839e58938a5c43cf742785378ea9a20e6390ec.tar.bz2
Made Qt5 module do just preprocessing instead of building full executable, so it is composable with e.g. gettext and flex modules (when they appear).
Diffstat (limited to 'modules')
-rw-r--r--modules/qt5.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/modules/qt5.py b/modules/qt5.py
index 4a6bb04..2b9e7d8 100644
--- a/modules/qt5.py
+++ b/modules/qt5.py
@@ -87,7 +87,7 @@ class Qt5Module():
else:
mlog.log(' rcc:', mlog.red('NO'))
- def executable(self, state, args, kwargs):
+ def preprocess(self, state, args, kwargs):
rcc_files = kwargs.pop('qresources', [])
if not isinstance(rcc_files, list):
rcc_files = [rcc_files]
@@ -100,12 +100,10 @@ class Qt5Module():
moc_sources = kwargs.pop('moc_sources', [])
if not isinstance(moc_sources, list):
moc_sources = [moc_sources]
- name = args[0]
srctmp = kwargs.pop('sources', [])
if not isinstance(srctmp, list):
srctmp = [srctmp]
sources = args[1:] + srctmp
- objects = []
if len(rcc_files) > 0:
rcc_kwargs = {'output' : '@BASENAME@.cpp',
'arguments' : ['@INPUT@', '-o', '@OUTPUT@']}
@@ -134,16 +132,7 @@ class Qt5Module():
moc_output = build.GeneratedList(moc_gen)
[moc_output.add_file(os.path.join(state.subdir, a)) for a in moc_sources]
sources.append(moc_output)
- if state.environment.is_cross_build():
- if kwargs.get('native', False):
- is_cross = False
- else:
- is_cross = True
- else:
- is_cross = False
-
- return build.Executable(name, state.subdir, is_cross, sources, objects,
- state.environment, kwargs)
+ return sources
def initialize():
return Qt5Module()