Skip to content
Permalink
Browse files

Generate sip.h in source directory for SIP v5

  • Loading branch information
mitya57 committed Jul 21, 2020
1 parent d0c4e0d commit e78841214e39857cac6533408a5c83fe27766cec
Showing with 8 additions and 0 deletions.
  1. +2 −0 cmake/FindSIP.cmake
  2. +6 −0 cmake/SIPMacros.cmake
@@ -43,6 +43,8 @@ ELSE(SIP_VERSION)
IF(${SIP_VERSION_STR} VERSION_LESS 5)
STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config})
ELSE(${SIP_VERSION_STR} VERSION_LESS 5)
FIND_PROGRAM(SIP_MODULE_EXECUTABLE sip-module)
ENDIF(${SIP_VERSION_STR} VERSION_LESS 5)
SET(SIP_FOUND TRUE)
ENDIF(sip_config)
@@ -121,6 +121,12 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES
DEPENDS ${SIP_EXTRA_FILES_DEPEND}
VERBATIM
)
IF (SIP_MODULE_EXECUTABLE)
ADD_CUSTOM_COMMAND(
OUTPUT ${_sip_output_files} APPEND
COMMAND ${SIP_MODULE_EXECUTABLE} --target-dir ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} --sip-h ${PYQT5_SIP_IMPORT}
)
ENDIF (SIP_MODULE_EXECUTABLE)

ADD_CUSTOM_TARGET(generate_sip_${MODULE_NAME}_cpp_files DEPENDS ${_sip_output_files})

0 comments on commit e788412

Please sign in to comment.
You can’t perform that action at this time.