Commit 1b6389ac authored by Sandro Knauß's avatar Sandro Knauß Committed by Ben Cooksley

Handle cases where tailing "/" in CMAKE_PREFIX_PATH fails the detection of...

Handle cases where tailing "/" in CMAKE_PREFIX_PATH fails the detection of additional include directories.

Differential Revision: https://phabricator.kde.org/D17579
parent 04f39f06
......@@ -211,21 +211,23 @@ class Library:
additionalIncludes = set() # type: Set[str]
# list of general include directories
noHeaders = set(buildEnvironment.get('CMAKE_PREFIX_PATH').split(":"))
noHeaders |= set([i+"/include" for i in buildEnvironment.get('CMAKE_PREFIX_PATH').split(":")])
prefixHeaders = [os.path.abspath(i) for i in buildEnvironment.get('CMAKE_PREFIX_PATH').split(":")]
noHeaders = set(prefixHeaders)
noHeaders |= set([os.path.join(i,"include") for i in prefixHeaders])
# From the target information we previously collected...
# Grab the list of libraries and include headers for abi-compliance-checker
for target in self.targets.values():
# Check each include directory to see if we need to add it....
for i in target['include_dirs']:
abspath = os.path.abspath(i)
# ignore general folders, as there are no lib specific headers are placed
if i in noHeaders or i.endswith("/KF5"):
additionalIncludes.add(i)
if abspath in noHeaders or abspath.endswith("/KF5"):
additionalIncludes.add(abspath)
continue
# Otherwise, if we don't already have it - add it to the list!
headers.add(i)
headers.add(abspath)
# If the library path isn't in the list, then we should add it to the list
libs.add(target['path'])
......
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