]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
[GITHUB] Fix issue #2: get relative path V9_13_BR 9.13.0 V9_13_0 V9_13_0rc1 V9_13_0rc2 V9_13_0rc3
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 2 Jul 2024 07:35:29 +0000 (09:35 +0200)
committermbs <martin.bernhard@opencascade.com>
Tue, 9 Jul 2024 17:32:10 +0000 (18:32 +0100)
cmake/SalomeMacros.cmake

index 2b7a36d958c2dcb652ec32547fd69a640aa902cb..3d30facec24d1846346fa42e1e5070c8f2e42eaa 100644 (file)
@@ -164,7 +164,7 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path)
     ENDIF(ext STREQUAL .py)
 
   # get relative path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
-  STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
+  FILE(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
   # convert "/" to "_"
   IF(rel_dir)
     STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})