Skip to content
Permalink
Browse files

Do not require manual CMakeCache intervention

  • Loading branch information
m-kuhn committed Nov 19, 2015
1 parent 8e5ba3b commit b1eb8127921d62bbef67fdfe55b4e904c54c64ee
Showing with 4 additions and 4 deletions.
  1. +2 −2 cmake/FindPyQt4.cmake
  2. +2 −2 cmake/FindPyQt5.cmake
@@ -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})
@@ -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})

0 comments on commit b1eb812

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