From: mpa Date: Thu, 31 Oct 2013 11:36:16 +0000 (+0000) Subject: CMake: X-Git-Tag: V7_3_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8de1f733f4a2a289864cd05edcddd3db2d426574;p=modules%2Fhomard.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 d96492d8..412043eb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,12 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED) MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) MARK_AS_ADVANCED(SALOME_HOMARD_INSTALL_RES_DATA) +# Accumulate environment variables for HOMARD module +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} + ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON} + ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) + # Sources # ======== diff --git a/SalomeHOMARDConfig.cmake.in b/SalomeHOMARDConfig.cmake.in index 8e57d60b..a983e1ab 100644 --- a/SalomeHOMARDConfig.cmake.in +++ b/SalomeHOMARDConfig.cmake.in @@ -46,6 +46,9 @@ SET_AND_CHECK(HOMARD_INCLUDE_DIRS "${HOMARD_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADER SET(HOMARD_INCLUDE_DIRS "${HOMARD_INCLUDE_DIRS};@_SalomeHOMARD_EXTRA_HEADERS@") SET(HOMARD_DEFINITIONS "@SMESH_DEFINITIONS@") +# Package specific environment variables +@_SalomeHOMARD_EXTRA_ENV_FULL@ + #### Now the specificities # Options exported by the package: diff --git a/adm_local/cmake_files/FindSalomeHOMARD.cmake b/adm_local/cmake_files/FindSalomeHOMARD.cmake index 27e35796..64d655c4 100644 --- a/adm_local/cmake_files/FindSalomeHOMARD.cmake +++ b/adm_local/cmake_files/FindSalomeHOMARD.cmake @@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeHOMARD SalomeHOMARD CONFIG) IF(NOT SalomeHOMARD_FIND_QUIETLY) MESSAGE(STATUS "Found Salome HOMARD: ${HOMARD_ROOT_DIR}") ENDIF() + +FOREACH(_res ${SalomeHOMARD_EXTRA_ENV}) + SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeHOMARD_EXTRA_ENV_${_res}}") +ENDFOREACH() \ No newline at end of file