Skip to content

Commit

Permalink
More robust sip version check
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 1, 2024
1 parent a10ee78 commit d0b36a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/FindPyQt6.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ IF(EXISTS PYQT6_VERSION_STR)
SET(PYQT6_FOUND TRUE)
ELSE(EXISTS PYQT6_VERSION_STR)

IF(SIP_BUILD_EXECUTABLE)
IF(${SIP_VERSION_STR} VERSION_GREATER 4)
# SIP >= 5.0 path

FILE(GLOB _pyqt6_metadata "${Python_SITEARCH}/PyQt6-*.dist-info/METADATA")
Expand All @@ -42,7 +42,7 @@ ELSE(EXISTS PYQT6_VERSION_STR)
SET(PYQT6_FOUND TRUE)
ENDIF(PYQT6_VERSION_STR)

ELSE(SIP_BUILD_EXECUTABLE)
ELSE()
# SIP 4.x path

FIND_FILE(_find_pyqt6_py FindPyQt6.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)
Expand All @@ -61,7 +61,7 @@ ELSE(EXISTS PYQT6_VERSION_STR)
SET(PYQT6_FOUND TRUE)
ENDIF(pyqt_config)

ENDIF(SIP_BUILD_EXECUTABLE)
ENDIF()

IF(PYQT6_FOUND)
IF(NOT PyQt6_FIND_QUIETLY)
Expand Down

0 comments on commit d0b36a8

Please sign in to comment.