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

CMakeLists.txt
SalomeSMESHConfig.cmake.in
adm_local/cmake_files/FindSalomeCGNS.cmake
adm_local/cmake_files/FindSalomeSMESH.cmake
adm_local/cmake_files/FindSalomeTBB.cmake
adm_local/cmake_files/FindSalomef2c.cmake

index 2a535338899da54bf45a114db8006f570c990c3e..ed90b46779dbe45cca6ad03e25500be77bf5b7b3 100755 (executable)
@@ -240,6 +240,12 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
 MARK_AS_ADVANCED(SALOME_SMESH_INSTALL_RES_DATA SALOME_SMESH_INSTALL_PLUGINS)
 
+# Accumulate environment variables for SMESH 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}) 
+
 # Sources 
 # ========
 
index c875e75c0e3a04ae723dad65a96d3f8073de2fa5..c4417cb2b39738538b161e9f01004e1034fe34f8 100644 (file)
@@ -46,6 +46,9 @@ SET_AND_CHECK(SMESH_INCLUDE_DIRS "${SMESH_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@
 SET(SMESH_INCLUDE_DIRS "${SMESH_INCLUDE_DIRS};@_SalomeSMESH_EXTRA_HEADERS@")
 SET(SMESH_DEFINITIONS "@GEOM_DEFINITIONS@")
 
+# Package specific environment variables
+@_SalomeSMESH_EXTRA_ENV_FULL@
+
 #### Now the specificities
 
 # Options exported by the package:
index 26517fdd4efa2df134e8bbdb6a448f1e326d8330..2974e731273ab99659c5e1d83e50a78378b2a255 100644 (file)
@@ -20,4 +20,8 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CGNS CGNS_INCLUDE_DIRS 1)
 MARK_AS_ADVANCED(CGNS_INCLUDE_DIRS CGNS_LIBRARIES)
 
-SALOME_ACCUMULATE_HEADERS(CGNS_INCLUDE_DIRS)
+IF(CGNS_FOUND) 
+  SALOME_ACCUMULATE_HEADERS(CGNS_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${CGNS_ROOT_DIR}/bin)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CGNS_ROOT_DIR}/lib)
+ENDIF()
\ No newline at end of file
index c316f9da8f339f990d8e3079a2c32d21fb70b918..ac29b1a92d61232102b776fe0f2754b12206102d 100644 (file)
@@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeSMESH SalomeSMESH CONFIG)
 IF(NOT SalomeSMESH_FIND_QUIETLY)
   MESSAGE(STATUS "Found Salome SMESH: ${SMESH_ROOT_DIR}")
 ENDIF()
+
+FOREACH(_res ${SalomeSMESH_EXTRA_ENV})
+  SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeSMESH_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file
index 2b9dcd5bad2f97019bdb6cbc58aace523140ff1a..65b2851c93441ad3dc9c96cc0c8e52921217c514 100644 (file)
@@ -20,4 +20,8 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(TBB TBB_INCLUDE_DIRS 2)
 MARK_AS_ADVANCED(TBB_INCLUDE_DIRS TBB_LIBRARIES)
 
-SALOME_ACCUMULATE_HEADERS(TBB_INCLUDE_DIRS)
+IF(TBB_FOUND) 
+  SALOME_ACCUMULATE_HEADERS(TBB_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${TBB_ROOT_DIR}/bin/intel64/cc4.1.0_libc2.4_kernel2.6.16.21)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${TBB_LIBRARIES})
+ENDIF()
\ No newline at end of file
index 1478d2dc09a1b6352bb6aaf8b69a0ef0334aa977..dcaf893667e1654d09a17178ff282cf9eee6feed 100755 (executable)
@@ -20,4 +20,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(f2c f2c_INCLUDE_DIRS 0)
 MARK_AS_ADVANCED(F2C_INCLUDE_DIRS F2C_LIBRARIES F2C_GENERATOR)
 
-SALOME_ACCUMULATE_HEADERS(F2C_INCLUDE_DIRS)
\ No newline at end of file
+IF(F2C_FOUND)
+  SALOME_ACCUMULATE_HEADERS(F2C_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${F2C_LIBRARIES}) 
+ENDIF()
\ No newline at end of file