]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Thu, 31 Oct 2013 13:49:13 +0000 (13:49 +0000)
committermpa <mpa@opencascade.com>
Thu, 31 Oct 2013 13:49:13 +0000 (13:49 +0000)
- Accumulate environment variables, to be used later to run some command in proper environment.

CMakeLists.txt
SalomeMEDConfig.cmake.in
adm_local/cmake_files/FindSalomeMED.cmake
adm_local/cmake_files/FindSalomeMetis.cmake
adm_local/cmake_files/FindSalomeParMetis.cmake
adm_local/cmake_files/FindSalomeScotch.cmake
adm_local/cmake_files/FindSalomeXDR.cmake

index 80630db8bc497c5f4eb1109c8fef059acfed1b2e..13105ef33952ceb3438635b58b894bd8ab393a22 100644 (file)
@@ -252,6 +252,12 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MED_version.h DESTINATION ${SALOME_INS
 CONFIGURE_FILE(VERSION.in VERSION @ONLY)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS})
 
+# Accumulate environment variables for MED module
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
+                                                 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
+
+
 # Sources 
 # ========
 IF(WIN32)
index c0e2a02abd2c7d9360593fd6aee0bff07f8bee59..870da99c6c0ca157443b150ca4cfa7b213ca4c8a 100644 (file)
@@ -46,6 +46,9 @@ SET_AND_CHECK(MED_INCLUDE_DIRS "${MED_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
 SET(MED_INCLUDE_DIRS "${MED_INCLUDE_DIRS};@_SalomeMED_EXTRA_HEADERS@")
 SET(MED_DEFINITIONS)
 
+# Package specific environment variables
+@_SalomeMED_EXTRA_ENV_FULL@
+
 #### Now the specificities
 
 # Options exported by the package:
index b984405eaefe8c291f7bb5787f253c4ab8315781..88bd3113d976ba72bed5d87302477d60390c0074 100644 (file)
@@ -37,3 +37,7 @@ SALOME_FIND_PACKAGE(SalomeMED SalomeMED CONFIG)
 IF(NOT SalomeMED_FIND_QUIETLY)
   MESSAGE(STATUS "Found Salome MED: ${MED_ROOT_DIR}")
 ENDIF()
+
+FOREACH(_res ${SalomeMED_EXTRA_ENV})
+  SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeMED_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file
index c0b1c4045efc399bd2efd6c9c53ed1b1c60dc2e7..4268c26f583fb40d5af8e753408e556dcf1816b5 100644 (file)
@@ -27,4 +27,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Metis METIS_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()
 
-SALOME_ACCUMULATE_HEADERS(METIS_INCLUDE_DIRS)
+IF(METIS_FOUND)
+  SALOME_ACCUMULATE_HEADERS(METIS_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${METIS_LIBRARIES})
+ENDIF()
\ No newline at end of file
index b8025a5116982288c78c49df095aa6df57be714f..6587a65f69f957a8d9d98fbc9e2387158349b219 100644 (file)
@@ -27,4 +27,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParMetis PARMETIS_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()
 
-SALOME_ACCUMULATE_HEADERS(PARMETIS_INCLUDE_DIRS)
\ No newline at end of file
+IF(PARMETIS_FOUND)
+  SALOME_ACCUMULATE_HEADERS(PARMETIS_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PARMETIS_LIBRARIES})
+ENDIF()
\ No newline at end of file
index b8fd552c913d7b24c57a7ee4a7659ddda108c2ba..7ac73fb1e215ed16facbdd7ce4ea0ce97e647f17 100644 (file)
@@ -27,4 +27,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Scotch SCOTCH_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()
 
-SALOME_ACCUMULATE_HEADERS(SCOTCH_INCLUDE_DIRS)
\ No newline at end of file
+IF(SCOTCH_FOUND)
+  SALOME_ACCUMULATE_HEADERS(SCOTCH_INCLUDE_DIRS)
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SCOTCH_LIBRARIES})
+ENDIF()
index 36d091789c7062ed0c447489b15ec3e0dfa5aea3..2db53e88f43075e51fe8d8e12cc34c165ded63c1 100644 (file)
@@ -27,4 +27,7 @@
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(XDR XDR_FOUND 1)
 #MARK_AS_ADVANCED()
 
-#SALOME_ACCUMULATE_HEADERS(XDR_INCLUDE_DIRS) # useless here because XDR is used only in CXX of MEDLoader
+#IF(XDR_FOUND) # useless here because XDR is used only in CXX of MEDLoader
+#  SALOME_ACCUMULATE_HEADERS(XDR_INCLUDE_DIRS)
+#  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${XDR_LIBRARIES})
+#ENDIF()
\ No newline at end of file