Skip to content

Commit a0b6dc2

Browse files
committedJul 4, 2018
fix build with SIP 4.19.11 (fixes #19332)
1 parent aefcc55 commit a0b6dc2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎cmake/FindSIP.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@
3939
print("sip_bin:%s" % sipcfg.sip_bin)
4040
print("default_sip_dir:%s" % sipcfg.default_sip_dir)
4141
print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
42-
print("sip_mod_dir:%s" % sipcfg.sip_mod_dir)
42+
if hasattr(sipcfg, "sip_mod_dir"):
43+
print("sip_mod_dir:%s" % sipcfg.sip_mod_dir)
44+
else:
45+
# SIP 4.19.10+ has no sipcfg.sip_mod_dir
46+
print("sip_mod_dir:%s" % sipcfg.sip_module_dir)

‎cmake/SIPMacros.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP CPP_FILES)
9696
ADD_DEFINITIONS( /bigobj )
9797
ENDIF(MSVC)
9898

99+
IF(NOT SIP_VERSION_NUM LESS 267018)
100+
SET(_sip_x ${_sip_x} -n sip)
101+
ENDIF(NOT SIP_VERSION_NUM LESS 267018)
102+
99103
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})
100104
SET(SUPPRESS_SIP_WARNINGS FALSE CACHE BOOL "Hide SIP warnings")
101105
MARK_AS_ADVANCED(SUPPRESS_SIP_WARNINGS)

0 commit comments

Comments
 (0)
Please sign in to comment.