Exposed OMNIORBPY_PYTHONPATH giving the path to the Python modules for OmniORB.
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()
# 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
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")
#
# 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
##############################################################################
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)
#
# !! 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}")
# - Sphinx detection
#
# Output variable: SPHINX_EXECUTABLE
+#
#
# The executable 'sphinx-build' is looked for and returned in the above variable.
#