]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Take all pyqt compilation flags from pyqtconfig.py
authorrnv <rnv@opencascade.com>
Tue, 17 Apr 2012 11:58:44 +0000 (11:58 +0000)
committerrnv <rnv@opencascade.com>
Tue, 17 Apr 2012 11:58:44 +0000 (11:58 +0000)
adm_local/cmake_files/FindSIPPYQT.cmake

index 7bc06801eb09c0bb4a96bc9af0dd7a6cc8c7066a..6a76d6a7e7ae9bba8724b44b378cbc6e01b07ab0 100644 (file)
@@ -63,16 +63,14 @@ 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)
 
 EXECUTE_PROCESS(
-  COMMAND ${PYTHON_EXECUTABLE} -c "import re, PyQt4.pyqtconfig ; s = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags ; m = re.search('(Qt_[0-9_]+)',s) ; print m.group(1)"
-  OUTPUT_VARIABLE SUPPORTED
+  COMMAND ${PYTHON_EXECUTABLE} -c "import re, PyQt4.pyqtconfig ; s = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags ; print s;"
+  OUTPUT_VARIABLE COMPILE_FLAGS
   OUTPUT_STRIP_TRAILING_WHITESPACE
   )
+string(REPLACE " " ";" FLAGS_LIST ${COMPILE_FLAGS})
+FOREACH(FLG ${FLAGS_LIST})
+SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${FLG})
+ENDFOREACH(FLG ${FLAGS_LIST})
 
-IF(WINDOWS)
-  SET(ws_flag WS_WIN)
-ELSE(WINDOWS)
-  SET(ws_flag WS_X11)
-ENDIF(WINDOWS)
-
-SET(PYQT_SIPFLAGS -x VendorID -x PyQt_NoPrintRangeBug -t ${ws_flag} -t ${SUPPORTED} -g -s .cc -c .)
-SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${PYQT_INCLUDES})
+SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c . )
+SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${PYQT_INCLUDES} )
\ No newline at end of file