From: Nabil Ghodbane Date: Tue, 2 Jul 2024 07:35:29 +0000 (+0200) Subject: [GITHUB] Fix issue #2: get relative path X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bcacd745901560b3ee6f0ae81c09e7f797a49fea;p=tools%2Fconfiguration.git [GITHUB] Fix issue #2: get relative path --- 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})