]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Tue, 29 Oct 2013 08:07:30 +0000 (08:07 +0000)
committermpa <mpa@opencascade.com>
Tue, 29 Oct 2013 08:07:30 +0000 (08:07 +0000)
- Accumulate environment variables, to be used later to run some command in proper environment.

CMakeLists.txt
SalomeGEOMConfig.cmake.in
adm_local/cmake_files/FindSalomeGEOM.cmake
adm_local/cmake_files/FindSalomeOpenCV.cmake

index 3b9def891ea2e48a2c2872a5f0862d6082d1a429..b67be8576b36bffdecbb6fa195589f4f4720a340 100755 (executable)
@@ -50,7 +50,7 @@ ELSE(EXISTS ${KERNEL_ROOT_DIR})
 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
 
 IF(SALOME_LIGHT_ONLY)
-  MESSAGE(FATAL_ERROR "GEOM module can't be built in Light mode (whiout CORBA)")
+  MESSAGE(FATAL_ERROR "GEOM module can't be built in Light mode (without CORBA)")
 ENDIF()
 
 # Platform setup
@@ -197,6 +197,12 @@ MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
 MARK_AS_ADVANCED(SALOME_GEOM_INSTALL_RES_DATA SALOME_GEOM_INSTALL_RES_SCRIPTS SALOME_GEOM_INSTALL_PLUGINS)
 MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
 
+# Accumulate environment variables for GEOM module
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${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 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) 
+
 # Sources 
 # ========
 ADD_SUBDIRECTORY(idl)
index 38a75bd978fa39bde2581ae5316cc8b2a6e7f36e..bf98b089fdd655f033f18502ce313529f097656c 100644 (file)
@@ -46,6 +46,9 @@ SET_AND_CHECK(GEOM_INCLUDE_DIRS "${GEOM_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
 SET(GEOM_INCLUDE_DIRS "${GEOM_INCLUDE_DIRS};@_SalomeGEOM_EXTRA_HEADERS@")
 SET(GEOM_DEFINITIONS "@KERNEL_DEFINITIONS@")
 
+# Package specific environment variables
+@_SalomeGEOM_EXTRA_ENV_FULL@
+
 #### Now the specificities
 
 # Options exported by the package:
index b33402698ec5009ec44a9102a551442a699eff27..867f2fe5340c2ce3db9cef11c219241f056f7449 100644 (file)
@@ -29,3 +29,7 @@ SALOME_FIND_PACKAGE(SalomeGEOM SalomeGEOM CONFIG)
 IF(NOT SalomeGEOM_FIND_QUIETLY)
   MESSAGE(STATUS "Found Salome GEOM: ${GEOM_ROOT_DIR}")
 ENDIF()
+
+FOREACH(_res ${SalomeGEOM_EXTRA_ENV})
+  SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeGEOM_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file
index 6f31b756da67d789337759e0a632d963da766bd0..06ed9d6544d2634b2c0d4ebdc3f12a8d3ad31c66 100644 (file)
 # Author: Adrien Bruneton
 #
 
-# OpenCV detection dor Salome
+# OpenCV detection for Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR 2)
 #MARK_AS_ADVANCED()
+
+IF(OpenCV_FOUND) 
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCV_LIBRARIES})
+ENDIF()