From ca9afc967338d7b78ae197ecbcd075778073b7ce Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 9 Jan 2025 20:23:48 +0400 Subject: [PATCH] add -static-libgcc -static-libstdc++ to libtonlibjson and emulator when PORTABLE=1 --- tonlib/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tonlib/CMakeLists.txt b/tonlib/CMakeLists.txt index 0855012cc..27f30ac92 100644 --- a/tonlib/CMakeLists.txt +++ b/tonlib/CMakeLists.txt @@ -98,7 +98,12 @@ else() add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS}) endif() -target_link_libraries(tonlibjson PRIVATE tonlibjson_private) +if (PORTABLE) + target_link_libraries(tonlibjson PRIVATE tonlibjson_private -static-libgcc -static-libstdc++) +else + target_link_libraries(tonlibjson PRIVATE tonlibjson_private) +if + generate_export_header(tonlibjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h) if (!BUILD_SHARED_LIBS) target_compile_definitions(tonlibjson PUBLIC TONLIBJSON_STATIC_DEFINE)