- Accumulate environment variables, to be used later to run some command in proper environment.
MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
MARK_AS_ADVANCED(SALOME_NETGENPLUGIN_INSTALL_RES_DATA)
+# Accumulate environment variables for NETGENPLUGIN 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
# ========
SET(NETGENPLUGIN_INCLUDE_DIRS "${NETGENPLUGIN_INCLUDE_DIRS};@_SalomeNETGENPLUGIN_EXTRA_HEADERS@")
SET(NETGENPLUGIN_DEFINITIONS "@SMESH_DEFINITIONS@")
+# Package specific environment variables
+@_SalomeNETGENPLUGIN_EXTRA_ENV_FULL@
+
#### Now the specificities
# Options exported by the package:
IF(NOT SalomeNETGENPLUGIN_FIND_QUIETLY)
MESSAGE(STATUS "Found Salome NETGENPLUGIN: ${NETGENPLUGIN_ROOT_DIR}")
ENDIF()
+
+FOREACH(_res ${SalomeNETGENPLUGIN_EXTRA_ENV})
+ SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeNETGENPLUGIN_EXTRA_ENV_${_res}}")
+ENDFOREACH()
\ No newline at end of file
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Netgen NETGEN_INCLUDE_DIRS 1)
MARK_AS_ADVANCED(NETGEN_INCLUDE_DIRS NETGEN_LIBRARIES)
-SALOME_ACCUMULATE_HEADERS(NETGEN_INCLUDE_DIRS)
+IF(NETGEN_FOUND)
+ SALOME_ACCUMULATE_HEADERS(NETGEN_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${NETGEN_LIBRARIES})
+ENDIF()