aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-05-05 20:42:28 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-05-05 20:42:28 +0300
commit58d68f3d10dcfa34ed9ce04e2e5aa81a70a8feca (patch)
treedbbf255ce2fefc124343fb99133458508f653305 /modules
parent8c0501e785deb724d9e7e754b78ce180adf3dc04 (diff)
downloadmeson-58d68f3d10dcfa34ed9ce04e2e5aa81a70a8feca.zip
meson-58d68f3d10dcfa34ed9ce04e2e5aa81a70a8feca.tar.gz
meson-58d68f3d10dcfa34ed9ce04e2e5aa81a70a8feca.tar.bz2
Qrc resources should be relative to the .qrc file and not the meson.build one. Closes #105.
Diffstat (limited to 'modules')
-rw-r--r--modules/qt4.py3
-rw-r--r--modules/qt5.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/qt4.py b/modules/qt4.py
index ebc7a13..c10eb48 100644
--- a/modules/qt4.py
+++ b/modules/qt4.py
@@ -83,6 +83,7 @@ class Qt4Module():
def parse_qrc(self, state, fname):
abspath = os.path.join(state.environment.source_dir, state.subdir, fname)
+ relative_part = os.path.split(fname)[0]
try:
tree = ET.parse(abspath)
root = tree.getroot()
@@ -92,7 +93,7 @@ class Qt4Module():
mlog.log("Warning, malformed rcc file: ", os.path.join(state.subdir, fname))
break
else:
- result.append(os.path.join(state.subdir, child.text))
+ result.append(os.path.join(state.subdir, relative_part, child.text))
return result
except Exception:
return []
diff --git a/modules/qt5.py b/modules/qt5.py
index 5312416..be996fb 100644
--- a/modules/qt5.py
+++ b/modules/qt5.py
@@ -90,6 +90,7 @@ class Qt5Module():
def parse_qrc(self, state, fname):
abspath = os.path.join(state.environment.source_dir, state.subdir, fname)
+ relative_part = os.path.split(fname)[0]
try:
tree = ET.parse(abspath)
root = tree.getroot()
@@ -99,7 +100,7 @@ class Qt5Module():
mlog.log("Warning, malformed rcc file: ", os.path.join(state.subdir, fname))
break
else:
- result.append(os.path.join(state.subdir, child.text))
+ result.append(os.path.join(state.subdir, relative_part, child.text))
return result
except Exception:
return []