Use posixpath when generating relative path

Fixes generating some paths with the backslash in the beginning

Change-Id: Ic7705d61f9362d3b854b2eb95f95a8951beca72d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Mårten Nordheim 2019-11-22 15:09:00 +01:00 committed by Leander Beernaert
parent abc2e51041
commit 360d9fba23

View File

@ -1229,7 +1229,7 @@ class Scope(object):
def get(self, key: str, *, ignore_includes: bool = False, inherit: bool = False) -> List[str]:
is_same_path = self.currentdir == self.basedir
if not is_same_path:
relative_path = os.path.relpath(self.currentdir, self.basedir)
relative_path = posixpath.relpath(self.currentdir, self.basedir)
if key == "QQC2_SOURCE_TREE":
qmake_conf_path = find_qmake_conf(os.path.abspath(self.currentdir))