aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools/CMakeLists.txt
diff options
context:
space:
mode:
authorShyamnath Premnadh <[email protected]>2022-10-27 15:43:35 +0200
committerShyamnath Premnadh <[email protected]>2022-11-16 11:50:30 +0100
commit43109854a2966afe2e0cf29961157a6f54d5775c (patch)
tree19ee00969da875e0ab8ecd836fa31c0a39faba55 /sources/pyside-tools/CMakeLists.txt
parent0bd80c41e1eb4c0c0ef9e490b9a6bf9b054f9aea (diff)
PySideTools: install tool only if corresponding Qt tool exists
- PySide tools which are wrappers around Qt tools are now only installed if the corresponding Qt tool exists. - PySide6 entry points for the Qt tool are now only created if the Qt tool exists in the corresponding Qt installation. - Incase the console entrypoint still exists and the corresponding Qt tool does not exist, the tool would exit stating that the Qt tool does not exist. eg: 'pyside6-uic' is run and 'uic' does not exist. The the tool outputs that the 'uic' does not exist. Ideally as per this change, PySide6 entrypoints for missing Qt tools should not exist at all. - versions.py deleted and contents moved to __init__.py. - Adds warning from Python incase if the tool does not exist. This is in addition to the CMake warning. Fixes: PYSIDE-2097 Pick-to: 6.4 6.2 Change-Id: I3f1b26d103679f7425d9ad85dfed8d9ad17f6fbf Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'sources/pyside-tools/CMakeLists.txt')
-rw-r--r--sources/pyside-tools/CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/sources/pyside-tools/CMakeLists.txt b/sources/pyside-tools/CMakeLists.txt
index 87c33926c..0853b9ed4 100644
--- a/sources/pyside-tools/CMakeLists.txt
+++ b/sources/pyside-tools/CMakeLists.txt
@@ -43,12 +43,16 @@ list(APPEND directories ${CMAKE_CURRENT_SOURCE_DIR}/qtpy2cpp_lib)
# pyside6-rcc, pyside6-uic, pyside6-designer, shiboken and pyside6-lupdate entrypoints
foreach(file ${files})
- install(FILES "${file}"
- DESTINATION bin
- PERMISSIONS
- OWNER_EXECUTE OWNER_WRITE OWNER_READ
- GROUP_EXECUTE GROUP_READ
- WORLD_EXECUTE WORLD_READ)
+ if(EXISTS ${file})
+ install(FILES "${file}"
+ DESTINATION bin
+ PERMISSIONS
+ OWNER_EXECUTE OWNER_WRITE OWNER_READ
+ GROUP_EXECUTE GROUP_READ
+ WORLD_EXECUTE WORLD_READ)
+ else()
+ message(WARNING "${file} does not exist. Hence, pyside6-${file} will not work")
+ endif()
endforeach()
foreach(directory ${directories})