[Libreoffice-commits] core.git: bin/gbuild-to-ide
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 26 07:57:21 UTC 2021
bin/gbuild-to-ide | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 9b9eb423eeeb41bb87cd13c2a83dc3e878fbac6e
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Feb 25 15:00:05 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Feb 26 08:56:33 2021 +0100
qtcreator: Create *.pro and *.pro.shared files in builddir, not srcdir
With the previous modifications to Qt Creator IDE integration,
this makes 'make qtcreator-ide-integration' work when run from
a separate build dir, and allows to use multiple build dirs for
the same source dir in parallel, each with its own set of
Qt Creator files referring to the specific build in their
build and run settings.
Change-Id: I5d85d0d280be5e5edca15760bcccfc793e1e4b2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111553
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 6d10f661e097..bdd83c26dfba 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1745,6 +1745,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
# so we can't reuse directly the same method than for kde integration.
self.build_data_libs()
+ # subdirs for the meta .pro file
+ subdirs_meta_pro = []
subdirs_list = self.data_libs.keys()
# Now we can create Qt files
for lib_folder in subdirs_list:
@@ -1763,7 +1765,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
defines = " \\\n".join(defines_list)
# create .pro file
- qt_pro_file = '%s/%s.pro' % (lib_loc, lib_name)
+ subdirs_meta_pro.append(lib_name)
+ qt_pro_file = os.path.join(self.base_folder, lib_name, lib_name + '.pro')
try:
content = QtCreatorIntegrationGenerator.pro_template % {'sources': sources, 'headers': headers,
'cxxflags': cxxflags, 'includepath': includepath, 'defines': defines}
@@ -1779,7 +1782,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
print("\n\n", file=sys.stderr)
# create .pro.shared file
- qt_pro_shared_file = '%s/%s.pro.shared' % (lib_loc, lib_name)
+ qt_pro_shared_file = os.path.join(self.base_folder, lib_name, lib_name + '.pro.shared')
try:
with open(qt_pro_shared_file, mode) as fproshared:
fproshared.write(self.generate_pro_shared_content(lib_folder))
@@ -1793,9 +1796,9 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
print("\n\n", file=sys.stderr)
# create meta .pro file (lists all sub projects)
- qt_meta_pro_file = 'lo.pro'
+ qt_meta_pro_file = os.path.join(self.base_folder, 'lo.pro')
try:
- subdirs = " \\\n".join(sorted(subdirs_list))
+ subdirs = " \\\n".join(sorted(subdirs_meta_pro))
content = QtCreatorIntegrationGenerator.pro_meta_template % {'subdirs': subdirs}
with open(qt_meta_pro_file, 'w+') as fmpro:
fmpro.write(content)
@@ -1808,7 +1811,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
print("\n\n", file=sys.stderr)
# create meta .pro.shared file
- qt_meta_pro_shared_file = 'lo.pro.shared'
+ qt_meta_pro_shared_file = os.path.join(self.base_folder, 'lo.pro.shared')
try:
with open(qt_meta_pro_shared_file, mode) as fmproshared:
fmproshared.write(self.generate_meta_pro_shared_content())
More information about the Libreoffice-commits
mailing list