From: bruneton Date: Tue, 9 Jul 2013 08:42:18 +0000 (+0000) Subject: Wrapping PyQt4 command to make sure it uses the proper PYTHONPATH X-Git-Tag: B4KillOfAutomake~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2949a58ab6eda7c974328d3b81232414af702613;p=modules%2Fgui.git Wrapping PyQt4 command to make sure it uses the proper PYTHONPATH --- diff --git a/adm_local/cmake_files/FindPyQt4.cmake b/adm_local/cmake_files/FindPyQt4.cmake index d4fa3b959..8ddfd220f 100644 --- a/adm_local/cmake_files/FindPyQt4.cmake +++ b/adm_local/cmake_files/FindPyQt4.cmake @@ -91,14 +91,6 @@ FOREACH(_dir ${PYQT_INCLUDE_DIRS}) LIST(APPEND PYQT_SIPFLAGS -I ${_dir}) ENDFOREACH() -# Wrap the final executable so that it always uses the proper environment: -IF(WIN32 AND NOT CYGWIN) - MESSAGE(WARNING "PyQt4 command was not tested under Linux") - SET(PYQT_PYUIC_EXECUTABLE set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH} && ${PYQT_PYUIC_PATH}) -ELSE() - SET(PYQT_PYUIC_EXECUTABLE /usr/bin/env PYTHONPATH=${PYQT_PYTHONPATH}:${SIP_PYTHONPATH} ${PYQT_PYUIC_PATH}) -ENDIF() - INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PyQt4 REQUIRED_VARS PYQT_PYUIC_PATH PYQT_SIPS_DIR PYQT_SIPFLAGS) diff --git a/adm_local/cmake_files/FindSalomePyQt4.cmake b/adm_local/cmake_files/FindSalomePyQt4.cmake index 358f3955e..a1a5f80bb 100644 --- a/adm_local/cmake_files/FindSalomePyQt4.cmake +++ b/adm_local/cmake_files/FindSalomePyQt4.cmake @@ -25,8 +25,18 @@ # IF(NOT SalomeSIP_FOUND AND NOT SalomePyQt4_FIND_QUIETLY) - MESSAGE(WARNING "PyQt4 needs SIP to be found correctly!") + MESSAGE(WARNING "PyQt4 needs SIP to be detected correctly!") ENDIF() SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PyQt4 PYQT_PYUIC_PATH 2) MARK_AS_ADVANCED(PYQT_PYUIC_EXECUTABLE PYQT_SIPS_DIR) + +# Wrap the final executable so that it always uses the proper environment: +# TODO: should be done like Sphinx in KERNEL (i.e. generating a shell script)? +IF(WIN32 AND NOT CYGWIN) + MESSAGE(WARNING "PyQt4 command was not tested under Win32") + SET(PYQT_PYUIC_EXECUTABLE set PYTHONPATH=${PYQT_PYTHONPATH};${SIP_PYTHONPATH} && ${PYQT_PYUIC_PATH}) +ELSE() + SET(PYQT_PYUIC_EXECUTABLE + /usr/bin/env PYTHONPATH=${PYQT_PYTHONPATH}:${SIP_PYTHONPATH}:${PYTHONPATH} ${PYQT_PYUIC_PATH}) +ENDIF()