From: mpa Date: Thu, 31 Oct 2013 13:45:07 +0000 (+0000) Subject: Synchronize adm files X-Git-Tag: V7_3_0a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=83b188ace7f9e6ee5842f9d56ab60d7f3da1c0b2;p=modules%2Fmed.git Synchronize adm files --- diff --git a/adm_local_without_kernel/cmake_files/FindSalomePython.cmake b/adm_local_without_kernel/cmake_files/FindSalomePython.cmake index c775e0163..13adbcdb0 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomePython.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomePython.cmake @@ -150,7 +150,7 @@ IF (SALOMEPYTHON_FOUND) ## 6. Save the final detected installation ## SET(PYTHON_ROOT_DIR "${_tmp_ROOT_DIR}") - SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR) + SET(PYTHON_PYTHONPATH "${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") ## 7. Specifics ## @@ -174,8 +174,8 @@ ELSE() ENDIF() 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}) + SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR) + SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PYTHON_EXECUTABLE}) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PYTHON_LIBRARIES}) + SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PYTHON_PYTHONPATH}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake b/adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake index e1a95474b..f7d625c95 100644 --- a/adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake +++ b/adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake @@ -21,19 +21,12 @@ # # !! Please read the generic detection procedure in SalomeMacros.cmake !! # -# The caller of this macro might set SPHINX_PYTHONPATH to provide a path to be added in front -# of the PYTHONPATH with which the sphinx command should be ran. -# -# Note the environment is also overriden in -# doc/docutils/CMakeLists.txt -# with the creation of a dedicated launcher script. -# SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Sphinx SPHINX_EXECUTABLE 2) # Also retrieve paths to DOCUTILS and SETUPTOOLS: SET(SETUPTOOLS_ROOT_DIR "$ENV{SETUPTOOLS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation") -SET(DOCUTILS_ROOT_DIR "$ENV{DOCUTILS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation") +SET(DOCUTILS_ROOT_DIR "$ENV{DOCUTILS_ROOT_DIR}" CACHE PATH "Path to the Docutils installation") # Ensure the command is run with the given PYTHONPATH IF(WIN32 AND NOT CYGWIN) @@ -46,9 +39,6 @@ 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) + SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_EXECUTABLE}) + SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${SPHINX_PYTHONPATH}) ENDIF() diff --git a/adm_local_without_kernel/cmake_files/FindSphinx.cmake b/adm_local_without_kernel/cmake_files/FindSphinx.cmake index f06933ab1..472156bed 100644 --- a/adm_local_without_kernel/cmake_files/FindSphinx.cmake +++ b/adm_local_without_kernel/cmake_files/FindSphinx.cmake @@ -1,11 +1,9 @@ # - Sphinx detection # -# Output variable: SPHINX_EXECUTABLE -# +# Output variables: +# SPHINX_EXECUTABLE - path to the Sphinx executable +# SPHINX_PYTHONPATH - path to the Sphinx Python modules # -# The executable 'sphinx-build' is looked for and returned in the above variable. -# - ########################################################################### # Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE # @@ -32,6 +30,11 @@ FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build PATH_SUFFIXES Scripts) +# Get root dir locally, going up two levels from the exec: +GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH) +GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH) +SET(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages") + # Handle the standard arguments of the find_package() command: INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE) diff --git a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake index 658e3f688..38e29a210 100755 --- a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake +++ b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake @@ -680,10 +680,10 @@ MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar) IF(TARGET ${_item}) GET_TARGET_PROPERTY(_item ${_item} LOCATION) ENDIF() - GET_FILENAME_COMPONENT(_item ${_item} PATH) + GET_FILENAME_COMPONENT(_item ${_item} PATH) ENDIF() IF(EXISTS ${_item}) - STRING(REGEX MATCH "^/usr" _usr_find ${_item}) + STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item}) LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res) IF(NOT _usr_find AND _res EQUAL -1) LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})