]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Wrapping PyQt4 command to make sure it uses the proper PYTHONPATH
authorbruneton <bruneton>
Tue, 9 Jul 2013 08:42:18 +0000 (08:42 +0000)
committerbruneton <bruneton>
Tue, 9 Jul 2013 08:42:18 +0000 (08:42 +0000)
adm_local/cmake_files/FindPyQt4.cmake
adm_local/cmake_files/FindSalomePyQt4.cmake

index d4fa3b9594e8f454da131be46e11ba08ece59a1e..8ddfd220f1bb77a57f9c9e9056e30915ec1650a4 100644 (file)
@@ -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)
 
index 358f3955ead6209cd3e000438f82667d64ae0a68..a1a5f80bb10bbb28f38e17349786ef143e7db7dc 100644 (file)
 #
 
 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()