Skip to content
Snippets Groups Projects
Unverified Commit 937b8861 authored by Andrei Sidorov's avatar Andrei Sidorov Committed by Alexander Turenko
Browse files

Fix static build for macOS Bug Sur

Fix static build for macOS 11.5 or higher.
On macOS SDK ver. 11.5 some `*.dylib` files was replaced with `*.tbd`.
So we replace `libunwind.dylib` on `libunwind.tbd`.
Because of macOS 10.15 support being dropped
conditional is not needed.

Closes #6052

(cherry picked from commit a7724d8f)
parent 5c746440
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,7 @@ if (APPLE)
# So we need to find library and header and
# copy it locally
find_path(UNWIND_INCLUDE_DIR libunwind.h)
find_library(UNWIND_LIBRARY libunwind.dylib
find_library(UNWIND_LIBRARY libunwind.tbd
PATH_SUFFIXES system
)
......@@ -225,7 +225,7 @@ if (APPLE)
"${UNWIND_INSTALL_PREFIX}/include/"
)
add_custom_command(
OUTPUT "${UNWIND_INSTALL_PREFIX}/lib/libunwind.dylib"
OUTPUT "${UNWIND_INSTALL_PREFIX}/lib/libunwind.tbd"
COMMAND ${CMAKE_COMMAND} -E make_directory
"${UNWIND_INSTALL_PREFIX}/lib"
COMMAND ${CMAKE_COMMAND} -E copy
......@@ -234,7 +234,7 @@ if (APPLE)
)
set(UNWIND_DEPENDENCIES
${UNWIND_DEPENDENCIES}
"${UNWIND_INSTALL_PREFIX}/lib/libunwind.dylib"
"${UNWIND_INSTALL_PREFIX}/lib/libunwind.tbd"
"${UNWIND_INSTALL_PREFIX}/include/libunwind.h"
)
else()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment