pkgconfig: avoid appending slash at Cflags
otherwise it can break some compilations, see
@@ -97,9 +97,10 @@ class PkgConfigModule(ExtensionModule):
ofile.write('Libs.private: {}\n'.format(' '.join(generate_libs_flags(priv_libs))))
ofile.write('Cflags:')
for h in subdirs:
- if h == '.':
- h = ''
ofile.write(' ')
+ if h == '.':
+ ofile.write('-I${includedir}')
+ else:
ofile.write(os.path.join('-I${includedir}', h))
for f in extra_cflags:
ofile.write(' ')
