From: mpa Date: Tue, 12 Nov 2013 09:03:23 +0000 (+0000) Subject: CMake: X-Git-Tag: BR_hydro_v_0_3_1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ea34c18558f62c35162b76253ec0f8642a3b6c7a;p=modules%2Fkernel.git CMake: - edit macro --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 707e04c0e..df81302fb 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -757,6 +757,14 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts) SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script}) ENDIF() + IF(WIN32) + SET(_ext "bat") + SET(_call_cmd "call") + ELSE() + SET(_ext "sh") + SET(_call_cmd ".") + ENDIF() + SET(_env) FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV}) FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}}) @@ -764,13 +772,9 @@ MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts) IF(${_item} STREQUAL "LD_LIBRARY_PATH") SET(_item PATH) ENDIF() - STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n") - SET(_ext "bat") - SET(_call_cmd "call") + STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n") ELSE(WIN32) SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n") - SET(_ext "sh") - SET(_call_cmd ".") ENDIF(WIN32) ENDFOREACH() ENDFOREACH()