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

20 files changed:
CMakeLists.txt
salome_adm/cmake_files/FindSalomeBoost.cmake
salome_adm/cmake_files/FindSalomeCAS.cmake
salome_adm/cmake_files/FindSalomeCppUnit.cmake
salome_adm/cmake_files/FindSalomeDoxygen.cmake
salome_adm/cmake_files/FindSalomeGraphviz.cmake
salome_adm/cmake_files/FindSalomeHDF5.cmake
salome_adm/cmake_files/FindSalomeLibBatch.cmake
salome_adm/cmake_files/FindSalomeLibXml2.cmake
salome_adm/cmake_files/FindSalomeMEDFile.cmake
salome_adm/cmake_files/FindSalomeMPI.cmake
salome_adm/cmake_files/FindSalomeOmniORB.cmake
salome_adm/cmake_files/FindSalomeOmniORBPy.cmake
salome_adm/cmake_files/FindSalomePThread.cmake
salome_adm/cmake_files/FindSalomePaco.cmake
salome_adm/cmake_files/FindSalomePython.cmake
salome_adm/cmake_files/FindSalomeSIMANIO.cmake
salome_adm/cmake_files/FindSalomeSWIG.cmake
salome_adm/cmake_files/FindSalomeSphinx.cmake
salome_adm/cmake_files/FindSalomeVTK.cmake

index ed390c81408b30a5a7903045a23d0642765504ea..7bca13653d3f33208e1cbc3dbdc39c1b4af514a3 100755 (executable)
@@ -168,6 +168,12 @@ MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS  SALOME_INSTALL_APPLISKEL_PYTH
 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)
@@ -193,7 +199,7 @@ INCLUDE(CMakePackageConfigHelpers)
 # 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)
index 5deff116dad991323ded2dd8f582100063e2a7d9..f257672188c8c315db2a9e7fbcd5de2971c9cd13 100644 (file)
@@ -45,4 +45,8 @@ IF(WIN32)
   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
index 91bf9254922d9c3b95e13e0a91476094a0fa2b3e..a440326d0573b8d2c91fb7e67b0cc0f8e1b4bea1 100644 (file)
@@ -46,6 +46,8 @@ ELSE()
   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()
index e8a5527e9c8c3f77cdee84b7d51d75dffa874b31..9e20e145fe21738bc26e4d625d2330c130ddb27a 100644 (file)
@@ -27,4 +27,7 @@
 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()
index b217886d34ce9708c59a941e1f8dde43a24f02c4..511d81bc44da30bb0d5b5c3fdd16fa16cb10493c 100644 (file)
@@ -38,3 +38,7 @@ IF(DOXYGEN_FOUND)
   ENDIF()
 ENDIF()
 MARK_AS_ADVANCED(DOXYGEN_SUPPORT_STL)
+
+IF(DOXYGEN_FOUND)
+  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${DOXYGEN_ROOT_DIR}/bin)
+ENDIF()
index e355263b1b229ab371959decd9954b8843e88c3a..bbefabff2d164ede5264b6ac50fab37633f15467 100644 (file)
@@ -26,3 +26,9 @@
 
 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
index c6460a944104d631640f746eec4bc20f922dcd4f..de7dc234d9365734cdeab4b15f1042c21db88ca2 100644 (file)
@@ -42,8 +42,6 @@ IF(NOT DEFINED HDF5_LIBRARIES)
   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
@@ -85,3 +83,9 @@ ENDIF()
 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()
index d7ce2e54e75177aea8badb2fd46d92693d5337fd..379f93c1d8ce61ee1b0219f3a8c896a08d6c20ec 100644 (file)
@@ -19,7 +19,7 @@
 # Author: Adrien Bruneton
 #
 
-# LibBatch detection dor Salome
+# LibBatch detection for Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
@@ -27,5 +27,7 @@
 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
index c736b2e6307b4e074604e36d0b2c12ca77b8fcdf..60c4dbcd546b111a2d62cbbd25519d72f93efa85 100644 (file)
@@ -28,4 +28,8 @@ ELSE()
 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()
index b53e057b5fa91e49c5af95d2e8eaa3ce7eea7645..9777406b2923b86e62fbeb093dd1a96ac312216c 100644 (file)
@@ -19,7 +19,7 @@
 # Author: Adrien Bruneton
 #
 
-# Medfile detection dor Salome
+# Medfile detection for Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
@@ -27,4 +27,8 @@
 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
index a12c163f92c93f17ba505186431c97acb42d2e12..8741b5df0522412309b83c11bbdc104e19161339 100644 (file)
@@ -30,4 +30,8 @@ MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
 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()
index b7ec2d98411b7946bad7fa357b07467736754bab..bddee88bb7cadbb9dac19932b773e068e00fd6ab 100644 (file)
 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
index 3e4a0c4932ef5ff812546e8186efa95f839d3831..08d85ceedf2b82e1e80ea060a85431f4515023df 100644 (file)
@@ -48,3 +48,10 @@ ELSE()
     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()
index 70639b708a5ee259d478720e0ac3482750517746..19964adb7daa826731b37898ac90e32833ebf1d0 100644 (file)
@@ -26,4 +26,8 @@
 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()
+
index b47bf8ebfb860ea7d0338dcd04daab1f29b82431..9026f01161f03bafc7b85c80d384edc5df005940 100644 (file)
 #
 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()
index 89c4eb6fd1a01b3608f43764b07e887d3a5a11a6..c775e0163e47a143033141dbf941ad46a28c2100 100644 (file)
@@ -173,6 +173,9 @@ ELSE()
   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()
index 2391f490a5095f8d103f4eda475203150af86f36..0a36c8407726b01fabe05a8cae56131661cc279b 100644 (file)
@@ -27,4 +27,7 @@
 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
index 80c7b6595566e4a672eb0389bd13f8f155bd7973..85786497d7ea2831f0517992aba116013ded541e 100644 (file)
@@ -25,3 +25,7 @@
 #
 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()
index 2d26445a94049cc50a1be995b63b97d1a18ea949..e1a95474bbc9a2ece2c91825a7b7ac3512eac0eb 100644 (file)
@@ -44,3 +44,11 @@ ELSE()
 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()
index 452ac9b4f981b38d83d1865ed651f7f722cbe178..24fe201c3a9205959b9445d976451fbfca319e70 100644 (file)
@@ -54,9 +54,17 @@ 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()