]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Additional fix for previous commit, to make SALOME_INSTALL_SCRIPTS macro working...
authorvsr <vsr@opencascade.com>
Thu, 18 Jun 2015 08:46:45 +0000 (11:46 +0300)
committervsr <vsr@opencascade.com>
Thu, 18 Jun 2015 08:46:45 +0000 (11:46 +0300)
salome_adm/cmake_files/SalomeMacros.cmake

index 0463a8a3645e3022a65bfb1325311a9ceb803f91..898b09531611d36ce1979dab6296abd9aedc61c0 100644 (file)
@@ -154,7 +154,11 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path)
   # get relativa path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
   STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
   # convert "/" to "_"
-  STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
+  IF(rel_dir)
+    STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
+  ELSE(rel_dir)
+    SET(unique_name _)
+  ENDIF(rel_dir)
 
   ENDFOREACH(file ${file_list})
   # Generate only one target for all requested Python script compilation.