- Accumulate environment variables, to be used later to run some command in proper environment.
MARK_AS_ADVANCED(SALOME_GUI_INSTALL_PARAVIEW_LIBS SALOME_GUI_INSTALL_RES_DATA SALOME_GUI_INSTALL_RES_SCRIPTS SALOME_GUI_INSTALL_PLUGINS)
MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
+# Accumulate environment variables for GUI module
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED})
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_GUI_INSTALL_PARAVIEW_LIBS})
+
# Sources
# ========
IF(NOT SALOME_LIGHT_ONLY)
SET(GUI_INCLUDE_DIRS "${GUI_INCLUDE_DIRS};@_SalomeGUI_EXTRA_HEADERS@")
SET(GUI_DEFINITIONS "@KERNEL_DEFINITIONS@")
+# Package specific environment variables
+@_SalomeGUI_EXTRA_ENV_FULL@
+
#### Now the specificities
# Options exported by the package:
IF(NOT SalomeGUI_FIND_QUIETLY)
MESSAGE(STATUS "Found Salome GUI: ${GUI_ROOT_DIR}")
-ENDIF()
\ No newline at end of file
+ENDIF()
+
+FOREACH(_res ${SalomeGUI_EXTRA_ENV})
+ SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeGUI_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file
# Author: Adrien Bruneton
#
-# OpenGL detection dor Salome
+# OpenGL detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenGL OPENGL_INCLUDE_DIR 1)
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(OPENGL_INCLUDE_DIR)
+IF(OPENGL_FOUND)
+ SALOME_ACCUMULATE_HEADERS(OPENGL_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OPENGL_LIBRARIES})
+ENDIF()
# Author: Adrien Bruneton
#
-# PyQt4 detection dor Salome
+# PyQt4 detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PyQt4 PYQT_PYUIC_EXECUTABLE 2)
MARK_AS_ADVANCED(PYQT_PYUIC_EXECUTABLE PYQT_PYRCC_EXECUTABLE PYQT_SIPS_DIR PYQT_PYUIC_PATH PYQT_PYRCC_PATH)
+
+IF(PYQT4_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PYQT4_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PYQT4_ROOT_DIR}/PyQt4)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PYQT4_ROOT_DIR}
+ ${PYQT4_ROOT_DIR}/PyQt4)
+ENDIF()
# Author: Adrien Bruneton
#
-# Qt4 detection dor Salome
+# Qt4 detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt4 QT_INCLUDES 2)
MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
-SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
+IF(QT4_FOUND)
+ SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
+ SALOME_ACCUMULATE_ENVIRONMENT(QT_PLUGIN_PATH ${QT4_ROOT_DIR}/plugins)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${QT4_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${QT4_ROOT_DIR}/lib)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qwt QWT_INCLUDE_DIR 1)
MARK_AS_ADVANCED(QWT_INCLUDE_DIR QWT_LIBRARY)
-SALOME_ACCUMULATE_HEADERS(QWT_INCLUDE_DIR)
\ No newline at end of file
+IF(QWT_FOUND)
+ SALOME_ACCUMULATE_HEADERS(QWT_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${QWT_ROOT_DIR}/lib)
+ENDIF()
\ No newline at end of file
# Author: Adrien Bruneton
#
-# SIP detection dor Salome
+# SIP detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SIP SIP_EXECUTABLE 2)
MARK_AS_ADVANCED(SIP_EXECUTABLE SIP_INCLUDE_DIR)
+
+IF(SIP_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SIP_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SIP_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${SIP_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ENDIF()
+