]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fixed MEDFile detection files installation. Provided the ability to override the...
authorbruneton <bruneton>
Tue, 9 Jul 2013 07:45:09 +0000 (07:45 +0000)
committerbruneton <bruneton>
Tue, 9 Jul 2013 07:45:09 +0000 (07:45 +0000)
Exposed OMNIORBPY_PYTHONPATH giving the path to the Python modules for OmniORB.

CMakeLists.txt
salome_adm/cmake_files/FindOmniORB.cmake
salome_adm/cmake_files/FindOmniORBPy.cmake
salome_adm/cmake_files/FindSalomeSphinx.cmake
salome_adm/cmake_files/FindSphinx.cmake

index 215944d02418df088f073689280f5239c14aa7ea..0ecedd4283775d633de4f16d3eda5ce37ca59f3d 100755 (executable)
@@ -102,6 +102,9 @@ ENDIF()
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen REQUIRED)
   FIND_PACKAGE(SalomeGraphviz)          # Remains optional even here.
+  
+  # Sphinx needs to run with a specific PYTHONPATH:
+  #SET(SPHINX_PYTHONPATH "${OMNIORBPY_PYTHONPATH}")
   FIND_PACKAGE(SalomeSphinx REQUIRED)
 ENDIF()
 
index 501ca5e96858be699c08016c566ce586e5d34f7d..11504fa0991df9f2b8fd832623a366caabae2cc3 100644 (file)
@@ -7,7 +7,6 @@
 # OMNIORB_VERSION      - OmniORB4 version
 # OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
 # OMNIORB_NAMESERVER   - OmniORB4 CORBA naming service (omniNames)
-# OMNIORB_PYTHON_BACKEND
 # and many other mainly used in UseOmniORB.cmake  
 #
 # Detection is made through calls to 
@@ -127,12 +126,7 @@ ELSE()
 ENDIF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
   
 SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
-#SET(OMNIORB_IDLPYFLAGS -bpython)
-#IF (OMNIORB_PYTHON_BACKEND) 
-  #SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
-#ENDIF()
 SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
-#SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
 SET(IDL_CLN_H .hh)
 SET(IDL_SRV_H .hh)
 SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
index 7a1c728eba273b27f737015b449c54c3638b9211..fd6a2cca37cd0eb5dfd2317368cc2cfbc51d3223 100644 (file)
@@ -2,6 +2,7 @@
 #
 # Sets the following variables:
 # OMNIORB_PYTHON_BACKEND - path to the Python backend
+# OMNIORBPY_PYTHONPATH   - Python path to the OmniORB modules
 #
 # Detection is made by looking for  
 #    lib/python${_py_version}/site-packages/omniidl_be/python.py
@@ -50,22 +51,13 @@ ENDIF()
 ##############################################################################
 MARK_AS_ADVANCED(OMNIORB_PYTHON_BACKEND)
   
-#SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
 SET(OMNIORB_IDLPYFLAGS -bpython)
 IF (OMNIORB_PYTHON_BACKEND) 
   SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
 ENDIF()
-#SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
 SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
-#SET(IDL_CLN_H .hh)
-#SET(IDL_SRV_H .hh)
-#SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
-#IF(WIN32)
-#  SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
-#ENDIF()
-#IF(APPLE)
-  #SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
-#ENDIF()
+
+GET_FILENAME_COMPONENT(OMNIORBPY_PYTHONPATH "${OMNIORB_PYTHON_BACKEND}" PATH)
 
 # Handle standard arguments:
 INCLUDE(FindPackageHandleStandardArgs)
index 3aa6527e7cb6a6326da144b9a1efe26ade4f2b69..f769a43cbb80f4a9854c6d09d770bb7d697c3321 100644 (file)
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
+# The caller of this macro might set SPHINX_PYTHONPATH to provide a PYTHONPATH with
+# which the sphinx command should be ran.
+#
 
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Sphinx SPHINX_EXECUTABLE 2)
+
+# Ensure the command is run with the given PYTHONPATH
+IF(WIN32 AND NOT CYGWIN)
+   MESSAGE(WARNING "Sphinx windows command needs a proper PYTHONPATH to run.")
+ELSE()
+   SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$ENV{PYTHONPATH}" ${SPHINX_EXECUTABLE})
+ENDIF()
+
 MARK_AS_ADVANCED(SPHINX_EXECUTABLE)
+#message("SPHINX_EXECUTABLE : ${SPHINX_EXECUTABLE}")
index ac0c954eea5ba4a6c10ba4846946e605652b72eb..8e05c7a73c21330b913c249bb7405651e6ffd72c 100644 (file)
@@ -1,6 +1,7 @@
 # - Sphinx detection
 #
 # Output variable: SPHINX_EXECUTABLE
+#                  
 # 
 # The executable 'sphinx-build' is looked for and returned in the above variable.
 #