Skip to content

Commit

Permalink
fix build with SIP 4.19.11 (fixes #19332)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 4, 2018
1 parent aefcc55 commit a0b6dc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/FindSIP.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@
print("sip_bin:%s" % sipcfg.sip_bin)
print("default_sip_dir:%s" % sipcfg.default_sip_dir)
print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
print("sip_mod_dir:%s" % sipcfg.sip_mod_dir)
if hasattr(sipcfg, "sip_mod_dir"):
print("sip_mod_dir:%s" % sipcfg.sip_mod_dir)
else:
# SIP 4.19.10+ has no sipcfg.sip_mod_dir
print("sip_mod_dir:%s" % sipcfg.sip_module_dir)
4 changes: 4 additions & 0 deletions cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP CPP_FILES)
ADD_DEFINITIONS( /bigobj )
ENDIF(MSVC)

IF(NOT SIP_VERSION_NUM LESS 267018)
SET(_sip_x ${_sip_x} -n sip)
ENDIF(NOT SIP_VERSION_NUM LESS 267018)

SET(SIPCMD ${SIP_BINARY_PATH} ${_sip_tags} -w -e ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} ${_sip_includes} ${_abs_module_sip})
SET(SUPPRESS_SIP_WARNINGS FALSE CACHE BOOL "Hide SIP warnings")
MARK_AS_ADVANCED(SUPPRESS_SIP_WARNINGS)
Expand Down

0 comments on commit a0b6dc2

Please sign in to comment.