Skip to content

Commit

Permalink
Do not require manual CMakeCache intervention
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 19, 2015
1 parent 8e5ba3b commit b1eb812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmake/FindPyQt4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ IF(EXISTS PYQT4_VERSION)
SET(PYQT4_FOUND TRUE)
ELSE(EXISTS PYQT4_VERSION)

FIND_FILE(_find_pyqt_py FindPyQt4.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_pyqt4_py FindPyQt4.py PATHS ${CMAKE_MODULE_PATH})

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt4_py} OUTPUT_VARIABLE pyqt_config)
IF(pyqt_config)
STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT4_VERSION ${pyqt_config})
STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT4_VERSION_STR ${pyqt_config})
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindPyQt5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ IF(EXISTS PYQT5_VERSION)
SET(PYQT5_FOUND TRUE)
ELSE(EXISTS PYQT5_VERSION)

FIND_FILE(_find_pyqt_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH})
FIND_FILE(_find_pyqt5_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH})

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt5_py} OUTPUT_VARIABLE pyqt_config)
IF(pyqt_config)
STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT5_VERSION ${pyqt_config})
STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT5_VERSION_STR ${pyqt_config})
Expand Down

0 comments on commit b1eb812

Please sign in to comment.