Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ function(z_vcpkg_fixup_macho_rpath_in_dir)
continue()
endif()

string(REGEX REPLACE "${macho_file}:\n" "" get_id_ov "${get_id_ov}")
# Escape regex special characters
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" regex "${macho_file}")
string(REGEX REPLACE "${regex}:\n" "" get_id_ov "${get_id_ov}")
string(REGEX REPLACE "\n.*" "" get_id_ov "${get_id_ov}")
list(APPEND adjusted_shared_lib_old_ids "${get_id_ov}")
list(APPEND adjusted_shared_lib_new_ids "${macho_new_id}")
Expand Down Expand Up @@ -189,7 +191,8 @@ function(z_vcpkg_fixup_macho_rpath_in_dir)
endif()
foreach(i RANGE ${last_adjusted_index})
list(GET adjusted_shared_lib_old_ids ${i} adjusted_old_id)
if(NOT get_deps_ov MATCHES "[ \t]${adjusted_old_id} ")
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" regex "${adjusted_old_id}")
if(NOT get_deps_ov MATCHES "[ \t]${regex} ")
continue()
endif()
list(GET adjusted_shared_lib_new_ids ${i} adjusted_new_id)
Expand Down