]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Tue, 29 Oct 2013 07:03:33 +0000 (07:03 +0000)
committermpa <mpa@opencascade.com>
Tue, 29 Oct 2013 07:03:33 +0000 (07:03 +0000)
- Accumulate environment variables, to be used later to run some command in proper environment.

CMakeLists.txt
SalomeGUIConfig.cmake.in
adm_local/cmake_files/FindSalomeGUI.cmake
adm_local/cmake_files/FindSalomeOpenGL.cmake
adm_local/cmake_files/FindSalomePyQt4.cmake
adm_local/cmake_files/FindSalomeQt4.cmake
adm_local/cmake_files/FindSalomeQwt.cmake
adm_local/cmake_files/FindSalomeSIP.cmake

index bee2f53d59d5e431ad5e6933009c21fe32b5966e..d9b903c1295f62c6eec3daca58f1b5c60bfe1bf8 100755 (executable)
@@ -189,6 +189,13 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
 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)
index b8493d58aed7a78ecd63aba6bef6df118463e721..45f22ada4094168a8602f0db734b1863b2a987e4 100644 (file)
@@ -46,6 +46,9 @@ SET_AND_CHECK(GUI_INCLUDE_DIRS "${GUI_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
 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:
index f397b0708c9af67054b377f4367ffa043e3b8355..73c40ece60ad790f605e2921bb78c348496e7113 100644 (file)
@@ -36,4 +36,8 @@ SALOME_FIND_PACKAGE(SalomeGUI SalomeGUI CONFIG)
 
 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
index 49028bdb730d637db9267c97e3ffa03b332ac8e7..d93f633b2b0d554de4bc8f9553caa2c28820ddfb 100644 (file)
@@ -19,7 +19,7 @@
 # Author: Adrien Bruneton
 #
 
-# OpenGL detection dor Salome
+# OpenGL detection for Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
@@ -31,5 +31,8 @@ ENDIF()
 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()
 
index 279bcbc54851be3b248e5720b4f4e611d7745d6e..31ea8fbfb5feea349ea6603f4110a4b9b02a49c6 100644 (file)
@@ -19,7 +19,7 @@
 # Author: Adrien Bruneton
 #
 
-# PyQt4 detection dor Salome
+# PyQt4 detection for Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
@@ -29,3 +29,10 @@ FIND_PACKAGE(SalomeSIP REQUIRED)
 
 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()
index 2378d71d2e167053b064918c745c73d780d47845..ccca972b4bac8c06c6d32ccb2c0b291584931145 100644 (file)
 # 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()
index 5490aa9ae0e43415da4151b974b9827e10dc31f7..14bd8832adcb442d3010ff2050cdeb76f674841f 100644 (file)
@@ -26,4 +26,7 @@
 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
index 9406e45bc4c4093aac6dce1587069f50cda0bc23..496e74516b386fcd568d40becbfd4e4fb1b3cf41 100644 (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()
+