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

CMakeLists.txt
SalomePYCALCULATORConfig.cmake.in
adm_local/cmake_files/FindSalomePYCALCULATOR.cmake

index 00ed638c8fd140b21930e4715c0c998d765bd538..71e24c6a1c698ea654ce8c69d61f25d424b6eedd 100755 (executable)
@@ -127,6 +127,11 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
 MARK_AS_ADVANCED(SALOME_PYCALCULATOR_INSTALL_RES_DATA)
 
 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
 MARK_AS_ADVANCED(SALOME_PYCALCULATOR_INSTALL_RES_DATA)
 
+# Accumulate environment variables for PYCALCULATOR 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 
 # ========
 
 # Sources 
 # ========
 
index 838ba9b2233894ae422dd862312f6da42de41e66..3d948f6a6d9f68df2cc7ec3c47463197f5e7e3d3 100644 (file)
@@ -40,6 +40,9 @@ SET_AND_CHECK(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_ROOT_DIR_EXP}/@SALOME_IN
 SET(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_INCLUDE_DIRS};@_SalomePYCALCULATOR_EXTRA_HEADERS@")
 SET(PYCALCULATOR_DEFINITIONS "@MED_DEFINITIONS@")
 
 SET(PYCALCULATOR_INCLUDE_DIRS "${PYCALCULATOR_INCLUDE_DIRS};@_SalomePYCALCULATOR_EXTRA_HEADERS@")
 SET(PYCALCULATOR_DEFINITIONS "@MED_DEFINITIONS@")
 
+# Package specific environment variables
+@_SalomePYCALCULATOR_EXTRA_ENV_FULL@
+
 # Load the dependencies for the libraries of @PROJECT_NAME@ 
 # (contains definitions for IMPORTED targets). This is only 
 # imported if we are not built as a subproject (in this case targets are already there)
 # Load the dependencies for the libraries of @PROJECT_NAME@ 
 # (contains definitions for IMPORTED targets). This is only 
 # imported if we are not built as a subproject (in this case targets are already there)
index 5eaa5e377ef0df9afa96f53bdbffe51c0ddc3abb..81836127da28313f3db83799562ac912881a587b 100644 (file)
@@ -27,4 +27,8 @@ SALOME_FIND_PACKAGE(SalomePYCALCULATOR SalomePYCALCULATOR CONFIG)
 
 IF(NOT SalomePYCALCULATOR_FIND_QUIETLY)
   MESSAGE(STATUS "Found Salome PYCALCULATOR: ${PYCALCULATOR_ROOT_DIR}")
 
 IF(NOT SalomePYCALCULATOR_FIND_QUIETLY)
   MESSAGE(STATUS "Found Salome PYCALCULATOR: ${PYCALCULATOR_ROOT_DIR}")
-ENDIF()
\ No newline at end of file
+ENDIF()
+
+FOREACH(_res ${SalomePYCALCULATOR_EXTRA_ENV})
+  SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomePYCALCULATOR_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file