]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
bos #29682 Directories may contain spaces and parentheses vsr/29682
authorvsr <vsr@opencascade.com>
Thu, 14 Apr 2022 13:41:58 +0000 (16:41 +0300)
committervsr <vsr@opencascade.com>
Thu, 14 Apr 2022 15:52:19 +0000 (18:52 +0300)
cmake/SalomeMacros.cmake

index a915cac639aaf9e82e44b0fe98ebc10db6f099b4..c14cdcfcd8ed15aa5ab5abb98500a3535c839bb7 100644 (file)
@@ -788,10 +788,10 @@ MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
   IF(_res EQUAL -1)
     LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})
   ENDIF()
-  SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "SET\(${PROJECT_NAME}_EXTRA_ENV ${_${PROJECT_NAME}_EXTRA_ENV}\)")
+  SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "SET\(${PROJECT_NAME}_EXTRA_ENV \"${_${PROJECT_NAME}_EXTRA_ENV}\"\)")
   FOREACH(_res ${_${PROJECT_NAME}_EXTRA_ENV})
     STRING(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" _res_path "${_${PROJECT_NAME}_EXTRA_ENV_${_res}}")
-    SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} ${_res_path}\)")
+    SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} \"${_res_path}\"\)")
   ENDFOREACH()
 ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)
 
@@ -1133,15 +1133,15 @@ 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")        
-    ELSEIF(APPLE)
-      IF(${_item} STREQUAL "LD_LIBRARY_PATH")
-        SET(${env} "${${env}} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n")
-      ELSE()
-        SET(${env} "${${env}} export ${_item}=${_val}:\${${_item}}\n")
-      ENDIF()
+    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")
     ELSE()
-       SET(${env} "${${env}} export ${_item}=${_val}:\${${_item}}\n")
+      SET(${env} "${${env}} export ${_item}=\"${_val}:\${${_item}}\"\n")
+    ENDIF()
+  ELSE()
+    SET(${env} "${${env}} export ${_item}=\"${_val}:\${${_item}}\"\n")
   ENDIF()
 ENDMACRO(SALOME_DO_VAR_SUBSTITUTION)