From ea34c18558f62c35162b76253ec0f8642a3b6c7a Mon Sep 17 00:00:00 2001 From: mpa Date: Tue, 12 Nov 2013 09:03:23 +0000 Subject: [PATCH] CMake: - edit macro --- salome_adm/cmake_files/SalomeMacros.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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() -- 2.39.2