From bcacd745901560b3ee6f0ae81c09e7f797a49fea Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 2 Jul 2024 09:35:29 +0200 Subject: [PATCH] [GITHUB] Fix issue #2: get relative path --- cmake/SalomeMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index bb0ab41..ba1cff0 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -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}) -- 2.39.2