Skip to content

Commit

Permalink
fix(SipDeprecated): Don't use deprecated annotation with message
Browse files Browse the repository at this point in the history
It crashes in 6.9.1
  • Loading branch information
troopa81 authored and nyalldawson committed Jan 30, 2025
1 parent 91c4e96 commit 176890f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES
CONFIGURE_FILE(${_sip_file} ${_out_sip_file})

# Deprecated annotation supports message only since version 6.9.0
if(${SIP_VERSION_STR} VERSION_LESS 6.9.0)
file(READ ${_out_sip_file} _content)
string(REGEX REPLACE "([/,])Deprecated=\"[^\"]*\"([/,])" "\\1Deprecated\\2" _content "${_content}")
file(GENERATE OUTPUT ${_out_sip_file} CONTENT "${_content}")
endif()
# if(${SIP_VERSION_STR} VERSION_LESS 6.9.0)

# For now disabling SIP deprecated because it crashes the application
file(READ ${_out_sip_file} _content)
string(REGEX REPLACE "([/,])Deprecated=\"[^\"]*\"([/,])" "\\1Deprecated\\2" _content "${_content}")
file(GENERATE OUTPUT ${_out_sip_file} CONTENT "${_content}")

# endif()

ENDFOREACH (_sip_file)

Expand Down

0 comments on commit 176890f

Please sign in to comment.