From 6ca5f54a73f76bb644d41c5f8f7b08c4484ceed9 Mon Sep 17 00:00:00 2001 From: neodiX Date: Fri, 10 Jan 2025 17:57:13 +0400 Subject: [PATCH] do not use -static-libgcc -static-libstdc++ on mac for shared libs --- emulator/CMakeLists.txt | 4 ++-- tonlib/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator/CMakeLists.txt b/emulator/CMakeLists.txt index 9b8bf047..ae3ccea8 100644 --- a/emulator/CMakeLists.txt +++ b/emulator/CMakeLists.txt @@ -35,8 +35,8 @@ else() add_library(emulator STATIC ${EMULATOR_SOURCE} ${EMULATOR_HEADERS}) endif() -if (PORTABLE) - target_link_libraries(emulator PUBLIC emulator_static git -static-libgcc -static-libstdc++) +if (PORTABLE AND NOT APPLE) + target_link_libraries(emulator PUBLIC emulator_static git -static-libgcc -static-libstdc++) else() target_link_libraries(emulator PUBLIC emulator_static git) endif() diff --git a/tonlib/CMakeLists.txt b/tonlib/CMakeLists.txt index 5ecc18e7..36ab0857 100644 --- a/tonlib/CMakeLists.txt +++ b/tonlib/CMakeLists.txt @@ -98,8 +98,8 @@ else() add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS}) endif() -if (PORTABLE) - target_link_libraries(tonlibjson PRIVATE tonlibjson_private -static-libgcc -static-libstdc++) +if (PORTABLE AND NOT APPLE) + target_link_libraries(emulator PUBLIC emulator_static git -static-libgcc -static-libstdc++) else() target_link_libraries(tonlibjson PRIVATE tonlibjson_private) endif()