From 1101afff9b37cb24baa743b6896119ca199ff047 Mon Sep 17 00:00:00 2001 From: mpa Date: Thu, 31 Oct 2013 11:28:38 +0000 Subject: [PATCH] CMake: - Accumulate environment variables, to be used later to run some command in proper environment. --- CMakeLists.txt | 5 +++++ SalomeHexoticPLUGINConfig.cmake.in | 3 +++ adm_local/cmake_files/FindSalomeHexoticPLUGIN.cmake | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f7741d..b922af0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,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_HexoticPLUGIN_INSTALL_RES_DATA) +# Accumulate environment variables for HexoticPLUGIN 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 # ======== diff --git a/SalomeHexoticPLUGINConfig.cmake.in b/SalomeHexoticPLUGINConfig.cmake.in index a6db03c..6de99cc 100644 --- a/SalomeHexoticPLUGINConfig.cmake.in +++ b/SalomeHexoticPLUGINConfig.cmake.in @@ -46,6 +46,9 @@ SET_AND_CHECK(HexoticPLUGIN_INCLUDE_DIRS "${HexoticPLUGIN_ROOT_DIR_EXP}/@SALOME_ SET(HexoticPLUGIN_INCLUDE_DIRS "${HexoticPLUGIN_INCLUDE_DIRS};@_SalomeHexoticPLUGIN_EXTRA_HEADERS@") SET(HexoticPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@") +# Package specific environment variables +@_SalomeHexoticPLUGIN_EXTRA_ENV_FULL@ + #### Now the specificities # Options exported by the package: diff --git a/adm_local/cmake_files/FindSalomeHexoticPLUGIN.cmake b/adm_local/cmake_files/FindSalomeHexoticPLUGIN.cmake index bf4beb9..1b79a40 100644 --- a/adm_local/cmake_files/FindSalomeHexoticPLUGIN.cmake +++ b/adm_local/cmake_files/FindSalomeHexoticPLUGIN.cmake @@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeHexoticPLUGIN SalomeHexoticPLUGIN CONFIG) IF(NOT SalomeHexoticPLUGIN_FIND_QUIETLY) MESSAGE(STATUS "Found Salome HexoticPLUGIN: ${HexoticPLUGIN_ROOT_DIR}") ENDIF() + +FOREACH(_res ${SalomeHexoticPLUGIN_EXTRA_ENV}) + SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeHexoticPLUGIN_EXTRA_ENV_${_res}}") +ENDFOREACH() \ No newline at end of file -- 2.39.2