Skip to content

Commit

Permalink
add -static-libgcc -static-libstdc++ to libtonlibjson and emulator wh…
Browse files Browse the repository at this point in the history
…en PORTABLE=1
  • Loading branch information
neodix42 committed Jan 9, 2025
1 parent 8cce66d commit ca9afc9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tonlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca9afc9

Please sign in to comment.