- Accumulate environment variables, to be used later to run some command in proper environment.
MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS SALOME_INSTALL_DOC)
MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG SALOME_INSTALL_AMCONFIG_LOCAL)
+# Accumulate environment variables for KERNEL 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
# ========
IF(NOT SALOME_LIGHT_ONLY)
# List of targets in this project we want to make visible to the rest of the world.
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-# Temporary solution for pakage src\DSC on windows
+# Temporary solution for package src\DSC on windows
IF(NOT WIN32)
SET(DSC_TGS CalciumC SalomeCalcium SalomeDatastream
SalomePalm SalomeDSCSupervBasic SalomeDSCSuperv)
SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS -DBOOST_ALL_DYN_LINK)
ENDIF()
-SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS)
+IF(Boost_FOUND OR BOOST_FOUND)
+ SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${BOOST_ROOT_DIR}/include)
+ENDIF()
\ No newline at end of file
ENDIF()
ENDIF()
-SALOME_ACCUMULATE_HEADERS(CAS_INCLUDE_DIRS)
-
-
+IF(CAS_FOUND)
+ SALOME_ACCUMULATE_HEADERS(CAS_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${CAS_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CAS_ROOT_DIR}/lib ${CAS_ROOT_DIR}/lin/lib)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CppUnit CPPUNIT_INCLUDE_DIRS 1)
MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES CPPUNIT_CONFIG_BIN CPPUNIT_SUBLIB_cppunit CPPUNIT_SUBLIB_dl)
-SALOME_ACCUMULATE_HEADERS(CPPUNIT_INCLUDE_DIRS)
+IF(CPPUNIT_FOUND)
+ SALOME_ACCUMULATE_HEADERS(CPPUNIT_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CPPUNIT_LIBRARIES})
+ENDIF()
ENDIF()
ENDIF()
MARK_AS_ADVANCED(DOXYGEN_SUPPORT_STL)
+
+IF(DOXYGEN_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${DOXYGEN_ROOT_DIR}/bin)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS 2)
MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS)
+
+IF(GRAPHVIZ_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${GRAPHVIZ_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${GRAPHVIZ_ROOT_DIR}/lib
+ ${GRAPHVIZ_ROOT_DIR}/lib/graphviz)
+ENDIF()
\ No newline at end of file
SET(HDF5_LIBRARIES hdf5)
ENDIF()
-SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS)
-
##
## 7. Specific to HDF5 only:
## Expose MPI configuration to the rest of the world
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${PREV_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
+
+IF(HDF5_FOUND)
+ SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${HDF5_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib)
+ENDIF()
# Author: Adrien Bruneton
#
-# LibBatch detection dor Salome
+# LibBatch detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_ROOT_DIR_EXP 0)
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS)
-
+IF(SALOMELIBBATCH_FOUND)
+ SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBBATCH_ROOT_DIR}/lib)
+ENDIF()
\ No newline at end of file
ENDIF()
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR)
+IF(LIBXML2_FOUND)
+ SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LIBXML2_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib)
+ENDIF()
# Author: Adrien Bruneton
#
-# Medfile detection dor Salome
+# Medfile detection for Salome
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1)
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(MEDFILE_INCLUDE_DIRS)
\ No newline at end of file
+IF(MEDFILE_FOUND)
+ SALOME_ACCUMULATE_HEADERS(MEDFILE_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${MEDFILE_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MEDFILE_ROOT_DIR}/lib)
+ENDIF()
\ No newline at end of file
SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
-SALOME_ACCUMULATE_HEADERS(MPI_INCLUDE_DIRS)
+IF(MPI_FOUND)
+ SALOME_ACCUMULATE_HEADERS(MPI_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${MPI_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MPI_ROOT_DIR}/lib)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1)
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(OMNIORB_INCLUDE_DIR)
\ No newline at end of file
+IF(OMNIORB_FOUND)
+ SALOME_ACCUMULATE_HEADERS(OMNIORB_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${OMNIORB_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OMNIORB_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${OMNIORB_ROOT_DIR}/lib
+ ${OMNIORB_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ENDIF()
\ No newline at end of file
MESSAGE(STATUS "OmniORB Python backend needs OmniORB, and OmniORB was not found!")
ENDIF()
ENDIF()
+
+IF(SalomeOmniORB_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${OMNIORB_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OMNIORB_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${OMNIORB_ROOT_DIR}/lib
+ ${OMNIORB_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PThread PTHREAD_INCLUDE_DIR 1)
MARK_AS_ADVANCED(PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
-SALOME_ACCUMULATE_HEADERS(PTHREAD_INCLUDE_DIR)
+IF(SALOMEPTHREAD_FOUND)
+ SALOME_ACCUMULATE_HEADERS(PTHREAD_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PTHREAD_LIBRARIES})
+ENDIF()
+
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Paco PACO_INCLUDE_DIRS 1)
#MARK_AS_ADVANCED()
+
+IF(SALOMEPACO_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PACO_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PACO_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PACO_ROOT_DIR}/lib
+ ${PACO_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+ENDIF()
MESSAGE(STATUS "Python was only partially (or not at all) found .")
ENDIF()
-
-#SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR)
-
+IF(SALOMEPYTHON_FOUND)
+ #SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PYTHON_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SIMANIO SIMANIO_INCLUDE_DIR 1)
#MARK_AS_ADVANCED()
-SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIR)
\ No newline at end of file
+IF(SIMANIO_FOUND)
+ SALOME_ACCUMULATE_HEADERS(SIMANIO_INCLUDE_DIR)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SIMANIO_LIBRARIES})
+ENDIF()
\ No newline at end of file
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION)
+
+IF(SWIG_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SWIG_ROOT_DIR}/bin)
+ENDIF()
ENDIF()
MARK_AS_ADVANCED(SPHINX_EXECUTABLE)
+
+IF(SPHINX_FOUND)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${SPHINX_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages
+ ${SETUPTOOLS_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages
+ ${DOCUTILS_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ENDIF()
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(VTK VTK_INCLUDE_DIRS 2)
MARK_AS_ADVANCED(VTK_DIR)
-SALOME_ACCUMULATE_HEADERS(VTK_INCLUDE_DIRS)
-
IF(VTK_FOUND)
MESSAGE(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
#MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}")
ENDIF()
+
+IF(VTK_FOUND)
+ SALOME_ACCUMULATE_HEADERS(VTK_INCLUDE_DIRS)
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PARAVIEW_ROOT_DIR}/bin)
+ SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PARAVIEW_ROOT_DIR}/lib/paraview-3.98)
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PARAVIEW_ROOT_DIR}/lib/paraview-3.98
+ ${PARAVIEW_ROOT_DIR}/lib/paraview-3.98/site-packages
+ ${PARAVIEW_ROOT_DIR}/lib/paraview-3.98/site-packages/paraview)
+ SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH ${PARAVIEW_ROOT_DIR}/lib/paraview-3.98)
+ENDIF()