Skip to content

Commit

Permalink
Update PyQtMacros module to handle removal of name option from pyrcc5
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Nov 5, 2017
1 parent d8b671d commit ff2a53c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/PyQtMacros.cmake
Expand Up @@ -87,8 +87,13 @@ MACRO (PYQT_ADD_RESOURCES outfiles )
ENDIF(NOT _ABS_PATH_INDICATOR)
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
ENDFOREACH(_RC_FILE)
SET(_name_opt)
IF(PYQT5_VERSION_STR VERSION_LESS 5.9.1)
# option removed in PyQt5 >= 5.9.1
SET(_name_opt -name ${outfile})
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYRCC_PROGRAM} -name ${outfile} -o ${outfile} ${infile}
COMMAND ${PYRCC_PROGRAM} ${_name_opt} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
DEPENDS ${_RC_DEPENDS})
SET(${outfiles} ${${outfiles}} ${outfile})
Expand Down

0 comments on commit ff2a53c

Please sign in to comment.