aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt.py
diff options
context:
space:
mode:
authorAlexis Jeandet <alexis.jeandet@member.fsf.org>2018-03-30 01:49:35 +0200
committerAlexis Jeandet <alexis.jeandet@member.fsf.org>2018-03-30 01:58:09 +0200
commitebeb248c07693da5e5f4f7b80fafadd98939d045 (patch)
treee8ef34d47f8de8137b4b67a3c008cbe9e3e816db /mesonbuild/modules/qt.py
parentfd245ce5cf4b0d1a6841fc6dccbf98acbd8fe401 (diff)
downloadmeson-ebeb248c07693da5e5f4f7b80fafadd98939d045.zip
meson-ebeb248c07693da5e5f4f7b80fafadd98939d045.tar.gz
meson-ebeb248c07693da5e5f4f7b80fafadd98939d045.tar.bz2
[Qt module] Added generated resource test case + some fixes
Subdir is already in generated resource path. Some PEP8 fixes. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Diffstat (limited to 'mesonbuild/modules/qt.py')
-rw-r--r--mesonbuild/modules/qt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index 77b1bb4..1625218 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -76,7 +76,7 @@ class QtBaseModule:
abspath = os.path.join(state.environment.source_dir, state.subdir, rcc_file)
relative_part = os.path.dirname(rcc_file)
elif type(rcc_file) is File:
- abspath = rcc_file.fname
+ abspath = rcc_file.absolute_path(state.environment.source_dir, state.environment.build_dir)
relative_part = os.path.dirname(abspath)
try:
@@ -97,18 +97,18 @@ class QtBaseModule:
# a)
if resource_path.startswith(os.path.abspath(state.environment.build_dir)):
resource_relpath = os.path.relpath(resource_path, state.environment.build_dir)
- result.append(File(is_built=True, subdir=state.subdir, fname=resource_relpath))
+ result.append(File(is_built=True, subdir='', fname=resource_relpath))
# either b) or c)
else:
result.append(File(is_built=False, subdir=state.subdir, fname=resource_path))
else:
# a)
- if os.path.exists(state.environment.build_dir+resource_path):
+ if os.path.exists(state.environment.build_dir + resource_path):
result.append(File(is_built=True, subdir=state.subdir, fname=resource_path))
# b)
else:
result.append(File(is_built=False, subdir=state.subdir,
- fname=os.path.join(relative_part, resource_path)))
+ fname=os.path.join(relative_part, resource_path)))
return result
except Exception:
return []