From: rnv Date: Tue, 27 Aug 2019 15:31:40 +0000 (+0300) Subject: Additional changes for documentation environment on Windows. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7e5456207481030168c2e0d8cd7376d3460e17b;p=tools%2Fconfiguration.git Additional changes for documentation environment on Windows. --- diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake index 4b1ad34..f893e0f 100644 --- a/cmake/FindPyQt5.cmake +++ b/cmake/FindPyQt5.cmake @@ -65,7 +65,7 @@ ENDIF() MARK_AS_ADVANCED(PYQT_SIP_MAIN_FILE) # Get PyQt compilation flags: -SET(PYQT_PYTHONPATH "${_tmp_ROOT_DIR}/PyQt5;${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/PyQt5") +SET(PYQT_PYTHONPATH "${_tmp_ROOT_DIR};${_tmp_ROOT_DIR}/PyQt5;${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/PyQt5") SET(PYQT_SIPFLAGS) EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; diff --git a/cmake/FindSalomeLibXml2.cmake b/cmake/FindSalomeLibXml2.cmake index e4d58b2..1303c06 100644 --- a/cmake/FindSalomeLibXml2.cmake +++ b/cmake/FindSalomeLibXml2.cmake @@ -31,4 +31,8 @@ ENDIF() IF(LIBXML2_FOUND) SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR) SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_LIBRARIES}) + IF(WIN32 AND LIBXML2_XMLLINT_EXECUTABLE) + GET_FILENAME_COMPONENT(LIBXML2_BIN_DIR ${LIBXML2_XMLLINT_EXECUTABLE} DIRECTORY) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_BIN_DIR}) + ENDIF() ENDIF() diff --git a/cmake/FindSalomeOpenCASCADE.cmake b/cmake/FindSalomeOpenCASCADE.cmake index 257b896..8dea8df 100644 --- a/cmake/FindSalomeOpenCASCADE.cmake +++ b/cmake/FindSalomeOpenCASCADE.cmake @@ -43,6 +43,16 @@ IF(OpenCASCADE_FOUND) SALOME_ACCUMULATE_HEADERS(OpenCASCADE_INCLUDE_DIR) SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_LIBRARY_DIR}) + IF(WIN32) + # RNV: Fix bug with OCCT CMake build procedure: + # In Debug ${OpenCASCADE_BINARY_DIR} and ${OpenCASCADE_LIBRARY_DIR} are stored in the + # config file w/o "d" suffix. To be checked with latest version of OCCT. + SET(SUFF "") + IF(${OpenCASCADE_BUILD_TYPE} STREQUAL "Debug") + SET(SUFF "d") + ENDIF() + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_BINARY_DIR}${SUFF}) + ENDIF() ELSE() # TODO: Detect OpenCASCADE if it is distributed without CMake configuration. diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index 1044836..80a3793 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -876,7 +876,7 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts) SET(_env "${_env}:${_ctx}\n" ) ENDIF() - IF(NOT ${_env} STREQUAL "") + IF(NOT "${_env}" STREQUAL "") SET(_script ${_script}.${_ext}) FILE(WRITE ${_script} "${_env}") SET(${output} ${_call_cmd} ${_script} && ${cmd} ${opts}) @@ -1116,7 +1116,7 @@ MACRO(SALOME_DO_VAR_SUBSTITUTION env variable value) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(_item PATH) ENDIF() - STRING(REPLACE "/" "\\" ${env} "${env}@SET ${_item}=${_val};%${_item}%\n") + STRING(REPLACE "/" "\\" ${env} "${${env}}@SET ${_item}=${_val};%${_item}%\n") ELSEIF(APPLE) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(${env} "${${env}} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n") diff --git a/cmake/UseSphinx.cmake b/cmake/UseSphinx.cmake index 7916b19..2b46a15 100644 --- a/cmake/UseSphinx.cmake +++ b/cmake/UseSphinx.cmake @@ -100,8 +100,7 @@ MACRO(ADD_MULTI_LANG_DOCUMENTATION) ENDIF() SET(_script "${_script_wo}.${_ext}") - SALOME_GENERATE_ENVIRONMENT_SCRIPT(_not_used_output ${_script_wo} "" "" - \ CONTEXT ${MULTI_LANG_TARGET_NAME} CONTEXT_NAME "DO_GENERATION" ADDITIONAL_VARIABLES ${MULTI_LANG_ADDITIONAL_ENVIRONMENT}) + SALOME_GENERATE_ENVIRONMENT_SCRIPT(_not_used_output ${_script_wo} "" "" CONTEXT "${MULTI_LANG_TARGET_NAME}" CONTEXT_NAME "DO_GENERATION" ADDITIONAL_VARIABLES ${MULTI_LANG_ADDITIONAL_ENVIRONMENT}) FILE(APPEND ${_script} "${CMDS}")