diff options
author | Julien Schueller <schueller@phimeca.com> | 2017-09-05 13:21:29 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2017-09-27 10:11:33 +0000 |
commit | 5291486b7c5dba824cb4205b8532a280a72592c6 (patch) | |
tree | ddb0719fb5420b2de6d1beeda8c0a4745c0a72d3 | |
parent | d82e9deb7a1a4e8f622c375e1c5564db70ae556f (diff) |
Make pyside2-uic executable by windows shell
Task-number: PYSIDE-564
Change-Id: I326287dabe1c09a4474f10a5afdbcaefa36a4919
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7be3488..561ba82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside2-uic GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) +# on win32 we cannot rely on the shebang for the shell to interpret the pyside2-uic command +if (WIN32) + file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyside2-uic.bat "python %~dp0pyside2-uic %*\n") + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2-uic.bat DESTINATION bin) +endif () + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside2uic/__init__.py" DESTINATION "${SITE_PACKAGE}/pyside2uic") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pyside2uic |