From: vsr Date: Tue, 15 Feb 2011 11:51:52 +0000 (+0000) Subject: Retrieve correct Qt version for PyQt sip flags X-Git-Tag: V6_3_0a1~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=500bc8b3619952e6cf8a6929fb2bd9c45d164aeb;p=modules%2Fgui.git Retrieve correct Qt version for PyQt sip flags --- 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)