From 77b71fa6f3b9bd925eef31540113b6beb0ab3b19 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 17 Apr 2012 11:58:44 +0000 Subject: [PATCH] Take all pyqt compilation flags from pyqtconfig.py --- adm_local/cmake_files/FindSIPPYQT.cmake | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/adm_local/cmake_files/FindSIPPYQT.cmake b/adm_local/cmake_files/FindSIPPYQT.cmake index 7bc06801e..6a76d6a7e 100644 --- a/adm_local/cmake_files/FindSIPPYQT.cmake +++ b/adm_local/cmake_files/FindSIPPYQT.cmake @@ -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 -- 2.39.2