Kaydet (Commit) 09491390 authored tarafından Michel Renon's avatar Michel Renon Kaydeden (comit) Michael Stahl

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/17054Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 2062d69c
...@@ -1291,7 +1291,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): ...@@ -1291,7 +1291,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
all_libs = set(self.gbuildparser.libs) | set(self.gbuildparser.exes) all_libs = set(self.gbuildparser.libs) | set(self.gbuildparser.exes)
for lib in all_libs: for lib in all_libs:
self._log("\nlibrary : %s, loc=%s" % (lib.short_name(), lib.location)) 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): def lopath(path):
return os.path.relpath(path, lib.location) return os.path.relpath(path, lib.location)
...@@ -1336,7 +1337,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): ...@@ -1336,7 +1337,8 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
'sources' : set(sources_list), 'sources' : set(sources_list),
'headers' : set(headers_list), 'headers' : set(headers_list),
'includepath' : set(includepath_list), 'includepath' : set(includepath_list),
'loc' : lib.location 'loc' : lib.location,
'name' : lib_name
} }
def emit(self): def emit(self):
...@@ -1356,13 +1358,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): ...@@ -1356,13 +1358,14 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
headers_list = sorted(self.data_libs[lib_folder]['headers']) headers_list = sorted(self.data_libs[lib_folder]['headers'])
includepath_list = sorted(self.data_libs[lib_folder]['includepath']) includepath_list = sorted(self.data_libs[lib_folder]['includepath'])
lib_loc = self.data_libs[lib_folder]['loc'] lib_loc = self.data_libs[lib_folder]['loc']
lib_name = self.data_libs[lib_folder]['name']
sources = " \\\n".join(sources_list) sources = " \\\n".join(sources_list)
headers = " \\\n".join(headers_list) headers = " \\\n".join(headers_list)
includepath = " \\\n".join(includepath_list) includepath = " \\\n".join(includepath_list)
# create .pro file # create .pro file
qt_pro_file = '%s/%s.pro' % (lib_loc, lib_folder) qt_pro_file = '%s/%s.pro' % (lib_loc, lib_name)
try: try:
content = QtCreatorIntegrationGenerator.pro_template % {'sources' : sources, 'headers' : headers, 'includepath' : includepath} content = QtCreatorIntegrationGenerator.pro_template % {'sources' : sources, 'headers' : headers, 'includepath' : includepath}
mode = 'w+' mode = 'w+'
...@@ -1378,7 +1381,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): ...@@ -1378,7 +1381,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
print("\n\n", file=sys.stderr) print("\n\n", file=sys.stderr)
# create .pro.user file # 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: try:
with open(qt_pro_user_file, mode) as fprouser: with open(qt_pro_user_file, mode) as fprouser:
fprouser.write(self.generate_pro_user_content(lib_folder)) fprouser.write(self.generate_pro_user_content(lib_folder))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment