From 500bc8b3619952e6cf8a6929fb2bd9c45d164aeb Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 15 Feb 2011 11:51:52 +0000 Subject: [PATCH] Retrieve correct Qt version for PyQt sip flags --- adm_local/cmake_files/FindSIPPYQT.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/adm_local/cmake_files/FindSIPPYQT.cmake b/adm_local/cmake_files/FindSIPPYQT.cmake index 448e6a980..15cdb6319 100644 --- a/adm_local/cmake_files/FindSIPPYQT.cmake +++ b/adm_local/cmake_files/FindSIPPYQT.cmake @@ -63,11 +63,7 @@ SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtAssistant -I${PYQT_SIPS}/QtD SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtNetwork -I${PYQT_SIPS}/QtSql) SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtSvg -I${PYQT_SIPS}/QtTest) -file(READ ${PYQT_SIPS}/QtCore/QtCoremod.sip SUPPORTED) -STRING(REGEX MATCH "Qt_[0-9]_[0-9]_[0-9]}" SUPPORTED ${SUPPORTED}) -STRING(LENGTH ${SUPPORTED} len) -MATH(EXPR len "${len}-1") -STRING(SUBSTRING ${SUPPORTED} 0 ${len} SUPPORTED) +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import re, pyqtconfig; s=pyqtconfig.Configuration().pyqt_sip_flags;m=re.search('(Qt_[0-9_]+)',s);print m.group(1)" OUTPUT_VARIABLE SUPPORTED) IF(WINDOWS) SET(ws_flag WS_WIN) -- 2.39.2