aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-05-16 12:09:52 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-05-16 10:20:34 +0000
commitad33a1248b4b47e8084a1bc808efb54a34ad8962 (patch)
tree9aec9092116bc12ef5ef3d5237bf03211cb8adda /sources/pyside2
parent9ef60d43a8918769fc6e16c44e1068ac87450828 (diff)
Fix building PySide2 with ninja
When building PySide2 with the ninja generator, ninja prints an error: "ninja: error: build.ninja:18549: multiple rules generate ./sources/pyside2/pyside_version.py [-w dupbuild=err]" This seems like an interaction error between CMake and ninja, where file dependency paths are not canonicalized. In our case this happens due to usage of pyside_version.py's relative path. Fix is to use an absolute path. Task-number: PYSIDE-663 Change-Id: Iee2ae5ea483e59ee67e53e3a2059108bf8a34fbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 651bf273..c109b2e0 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -10,7 +10,11 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
"${CMAKE_CURRENT_BINARY_DIR}/_config.py" @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py"
+# Use absolute path instead of relative path, to avoid ninja build errors due to
+# duplicate file dependency inconsistency.
+set(pyside_version_relative_path "${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py")
+get_filename_component(pyside_version_path ${pyside_version_relative_path} ABSOLUTE)
+configure_file("${pyside_version_path}"
"${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py" @ONLY)
# qt.conf needs to be placed next to QtWebEngineProcess so that the executable uses the correct