From d3d063f2643315693e0aedda3df5b3d56c9761c2 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Sun, 6 Jun 2021 16:28:09 +0200 Subject: [PATCH] Fix sobject.sip file not detected with custom PyQt installation --- cmake/FindPyQt4.cmake | 4 +++- cmake/FindPyQt5.cmake | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/FindPyQt4.cmake b/cmake/FindPyQt4.cmake index bc7affe..3b9a84e 100644 --- a/cmake/FindPyQt4.cmake +++ b/cmake/FindPyQt4.cmake @@ -56,7 +56,9 @@ GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH) # - /usr/share/sip/PyQt4/QtCore, for a system install # - or /sip/QtCore, for a custom install # - or /share/sip/QtCore, for a custom install -FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip PATH_SUFFIXES share/sip/QtCore sip/QtCore share/sip/PyQt4/QtCore) +FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip + PATHS ${_tmp_ROOT_DIR} + PATH_SUFFIXES share/sip/QtCore sip/QtCore share/sip/PyQt4/QtCore) IF(PYQT_SIP_MAIN_FILE) GET_FILENAME_COMPONENT(PYQT_SIPS_DIR "${PYQT_SIP_MAIN_FILE}" PATH) diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake index 35efa02..bcb4e2a 100644 --- a/cmake/FindPyQt5.cmake +++ b/cmake/FindPyQt5.cmake @@ -56,7 +56,9 @@ GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH) # - /usr/share/sip/PyQt5/QtCore, for a system install # - or /sip/QtCore, for a custom install # - or /share/sip/QtCore, for a custom install -FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip PATH_SUFFIXES share/sip/QtCore sip/QtCore share/sip/PyQt5/QtCore) +FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip + PATHS ${_tmp_ROOT_DIR} + PATH_SUFFIXES share/sip/QtCore sip/QtCore share/sip/PyQt5/QtCore) IF(PYQT_SIP_MAIN_FILE) GET_FILENAME_COMPONENT(PYQT_SIPS_DIR "${PYQT_SIP_MAIN_FILE}" PATH) -- 2.39.2