From 360d9fba237906e90559bf3477a39caf392af415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 22 Nov 2019 15:09:00 +0100 Subject: 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 --- util/cmake/pro2cmake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 9d01dd73e2..a93c506169 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -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)) -- cgit v1.2.3