Skip to content

Commit ff2a53c

Browse files
committed
Update PyQtMacros module to handle removal of name option from pyrcc5
1 parent d8b671d commit ff2a53c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmake/PyQtMacros.cmake

+6-1
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ MACRO (PYQT_ADD_RESOURCES outfiles )
8787
ENDIF(NOT _ABS_PATH_INDICATOR)
8888
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
8989
ENDFOREACH(_RC_FILE)
90+
SET(_name_opt)
91+
IF(PYQT5_VERSION_STR VERSION_LESS 5.9.1)
92+
# option removed in PyQt5 >= 5.9.1
93+
SET(_name_opt -name ${outfile})
94+
ENDIF()
9095
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
91-
COMMAND ${PYRCC_PROGRAM} -name ${outfile} -o ${outfile} ${infile}
96+
COMMAND ${PYRCC_PROGRAM} ${_name_opt} -o ${outfile} ${infile}
9297
MAIN_DEPENDENCY ${infile}
9398
DEPENDS ${_RC_DEPENDS})
9499
SET(${outfiles} ${${outfiles}} ${outfile})

0 commit comments

Comments
 (0)