summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichel Renon <michel.renon@free.fr>2015-07-11 23:56:12 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-20 10:17:29 +0000
commit09491390e6662516339f8aa920bb8ae9493e34c0 (patch)
tree4d47d5af99cf5807c39fbd8db586d92f227b6ca0 /bin
parent2062d69c390d372ab4253832012e6cbb27df6dda (diff)
tdf#92560 : QtCreator integration complains about a "ucpp" without a .pro file
The script gbuild-to-ide now handles correctly specific case where a module is not a direct subfolder of LibreOffice base folder. Currently, 3 modules : external/neon, external/clucene, external/ucpp. Change-Id: I9477519a530439d43919b4e1b51dc2c71ee05fe0 Reviewed-on: https://gerrit.libreoffice.org/17054 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gbuild-to-ide11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 0452a9ee4c20..af1b20a0ce03 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1291,7 +1291,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
all_libs = set(self.gbuildparser.libs) | set(self.gbuildparser.exes)
for lib in all_libs:
self._log("\nlibrary : %s, loc=%s" % (lib.short_name(), lib.location))
- lib_folder = os.path.basename(lib.location)
+ lib_name = os.path.basename(lib.location)
+ lib_folder = os.path.relpath(lib.location, self.base_folder)
def lopath(path):
return os.path.relpath(path, lib.location)
@@ -1336,7 +1337,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
'sources' : set(sources_list),
'headers' : set(headers_list),
'includepath' : set(includepath_list),
- 'loc' : lib.location
+ 'loc' : lib.location,
+ 'name' : lib_name
}
def emit(self):
@@ -1356,13 +1358,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
headers_list = sorted(self.data_libs[lib_folder]['headers'])
includepath_list = sorted(self.data_libs[lib_folder]['includepath'])
lib_loc = self.data_libs[lib_folder]['loc']
+ lib_name = self.data_libs[lib_folder]['name']
sources = " \\\n".join(sources_list)
headers = " \\\n".join(headers_list)
includepath = " \\\n".join(includepath_list)
# create .pro file
- qt_pro_file = '%s/%s.pro' % (lib_loc, lib_folder)
+ qt_pro_file = '%s/%s.pro' % (lib_loc, lib_name)
try:
content = QtCreatorIntegrationGenerator.pro_template % {'sources' : sources, 'headers' : headers, 'includepath' : includepath}
mode = 'w+'
@@ -1378,7 +1381,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
print("\n\n", file=sys.stderr)
# create .pro.user file
- qt_pro_user_file = '%s/%s.pro.user' % (lib_loc, lib_folder)
+ qt_pro_user_file = '%s/%s.pro.user' % (lib_loc, lib_name)
try:
with open(qt_pro_user_file, mode) as fprouser:
fprouser.write(self.generate_pro_user_content(lib_folder))