# directory.
#
MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
+ PARSE_ARGUMENTS(SALOME_GENERATE_ENVIRONMENT_SCRIPT "CONTEXT" "" ${ARGN})
IF(IS_ABSOLUTE ${script})
SET(_script ${script})
ELSE()
ENDIF()
SET(_env)
+ IF(WIN32 AND SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT)
+ SET(_env "IF ${_env}\"%SET_${SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT}_VARS%\"==\"1\" GOTO END\n")
+ ENDIF()
FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
IF(WIN32)
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")
ENDIF()
ENDFOREACH()
ENDFOREACH()
+ IF(WIN32 AND SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT)
+ SET(_env "${_env}@SET SET_${SALOME_GENERATE_ENVIRONMENT_SCRIPT_CONTEXT}_VARS=1\n")
+ SET(_env "${_env}:END\n" )
+ ENDIF()
+
SET(_script ${_script}.${_ext})
FILE(WRITE ${_script} "${_env}")
ENDIF()
SET(_env)
+ IF(WIN32)
+ SET(_env "IF ${_env}\"%SET_${MULTI_LANG_TARGET_NAME}_VARS%\"==\"1\" GOTO DO_GENERATION\n")
+ ENDIF()
FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
IF(WIN32)
ENDIF()
ENDFOREACH()
ENDFOREACH()
+ IF(WIN32)
+ SET(_env "${_env}@SET SET_${MULTI_LANG_TARGET_NAME}_VARS=1\n")
+ SET(_env "${_env}:DO_GENERATION\n" )
+ ENDIF()
+
SET(_script ${CMAKE_CURRENT_BINARY_DIR}/build_doc.${_ext})
FILE(WRITE ${_script} ${_env}${CMDS})