From: mpa Date: Wed, 30 Oct 2013 06:34:51 +0000 (+0000) Subject: CMake: X-Git-Tag: V7_3_0a1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd182bee0eeee243e4efdf09d2e6736ca1c63486;p=modules%2Fhexablock.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 3722cbe..4221f8d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,10 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED) MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) MARK_AS_ADVANCED(SALOME_HEXABLOCK_INSTALL_RES_DATA) +# Accumulate environment variables for HEXABLOCK module +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) + # Sources # ======== diff --git a/SalomeHEXABLOCKConfig.cmake.in b/SalomeHEXABLOCKConfig.cmake.in index a7eb17a..08dc6f3 100644 --- a/SalomeHEXABLOCKConfig.cmake.in +++ b/SalomeHEXABLOCKConfig.cmake.in @@ -46,6 +46,9 @@ SET_AND_CHECK(HEXABLOCK_INCLUDE_DIRS "${HEXABLOCK_ROOT_DIR_EXP}/@SALOME_INSTALL_ SET(HEXABLOCK_INCLUDE_DIRS "${HEXABLOCK_INCLUDE_DIRS};@_SalomeHEXABLOCK_EXTRA_HEADERS@") SET(HEXABLOCK_DEFINITIONS "@GEOM_DEFINITIONS@") +# Package specific environment variables +@_SalomeHEXABLOCK_EXTRA_ENV_FULL@ + #### Now the specificities # Options exported by the package: diff --git a/adm_local/cmake_files/FindSalomeHEXABLOCK.cmake b/adm_local/cmake_files/FindSalomeHEXABLOCK.cmake index 9cc94cb..a1ccb0f 100644 --- a/adm_local/cmake_files/FindSalomeHEXABLOCK.cmake +++ b/adm_local/cmake_files/FindSalomeHEXABLOCK.cmake @@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeHEXABLOCK SalomeHEXABLOCK CONFIG) IF(NOT SalomeHEXABLOCK_FIND_QUIETLY) MESSAGE(STATUS "Found Salome HEXABLOCK: ${HEXABLOCK_ROOT_DIR}") ENDIF() + +FOREACH(_res ${SalomeHEXABLOCK_EXTRA_ENV}) + SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeHEXABLOCK_EXTRA_ENV_${_res}}") +ENDFOREACH() \ No newline at end of file