Skip to content

Commit

Permalink
ThirdParty.cmake: don't find PATCHELF_EXECUTABLE on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jan 8, 2025
1 parent 66900fd commit 7ccc983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/ThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ function(copy_third_party_shared_libs target_dir)

# Set RPATH to $ORIGIN for the copied libraries
if(NOT WIN32)
find_program(PATCHELF_EXECUTABLE patchelf REQUIRED)
foreach(lib ${copied_files})
get_filename_component(lib_name ${lib} NAME)
if(APPLE)
execute_process(COMMAND install_name_tool -add_rpath @loader_path "${target_dir}/${lib_name}"
COMMAND_ERROR_IS_FATAL ANY)
else()
find_program(PATCHELF_EXECUTABLE patchelf REQUIRED)
execute_process(COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath \$ORIGIN "${target_dir}/${lib_name}"
COMMAND_ERROR_IS_FATAL ANY)
endif()
Expand Down

0 comments on commit 7ccc983

Please sign in to comment.