From: mpa Date: Wed, 30 Oct 2013 06:40:00 +0000 (+0000) Subject: CMake: X-Git-Tag: V7_3_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6acbcc5ea6c2269e6b6ec15dda7dcb68a4b68daa;p=plugins%2Fhexablockplugin.git CMake: - Accumulate environment variables, to be used later to run some command in proper environment. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8927f50..ee3f496 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,6 +179,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_HEXABLOCKPLUGIN_INSTALL_RES_DATA) +# Accumulate environment variables for HEXABLOCKPLUGIN module +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} + ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) + # Sources # ======== diff --git a/SalomeHEXABLOCKPLUGINConfig.cmake.in b/SalomeHEXABLOCKPLUGINConfig.cmake.in index fc7c289..718e5d3 100644 --- a/SalomeHEXABLOCKPLUGINConfig.cmake.in +++ b/SalomeHEXABLOCKPLUGINConfig.cmake.in @@ -46,6 +46,9 @@ SET_AND_CHECK(HEXABLOCKPLUGIN_INCLUDE_DIRS "${HEXABLOCKPLUGIN_ROOT_DIR_EXP}/@SAL SET(HEXABLOCKPLUGIN_INCLUDE_DIRS "${HEXABLOCKPLUGIN_INCLUDE_DIRS};@_SalomeHEXABLOCKPLUGIN_EXTRA_HEADERS@") SET(HEXABLOCKPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@") +# Package specific environment variables +@_SalomeHEXABLOCKPLUGIN_EXTRA_ENV_FULL@ + #### Now the specificities # Options exported by the package: diff --git a/adm_local/cmake_files/FindSalomeHEXABLOCKPLUGIN.cmake b/adm_local/cmake_files/FindSalomeHEXABLOCKPLUGIN.cmake index 3e4d4e4..fdf1a92 100644 --- a/adm_local/cmake_files/FindSalomeHEXABLOCKPLUGIN.cmake +++ b/adm_local/cmake_files/FindSalomeHEXABLOCKPLUGIN.cmake @@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeHEXABLOCKPLUGIN SalomeHEXABLOCKPLUGIN CONFIG) IF(NOT SalomeHEXABLOCKPLUGIN_FIND_QUIETLY) MESSAGE(STATUS "Found Salome HEXABLOCKPLUGIN: ${HEXABLOCKPLUGIN_ROOT_DIR}") ENDIF() + +FOREACH(_res ${SalomeHEXABLOCKPLUGIN_EXTRA_ENV}) + SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeHEXABLOCKPLUGIN_EXTRA_ENV_${_res}}") +ENDFOREACH() \ No newline at end of file