Skip to content

Commit

Permalink
link libstdc++ statically
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Jan 15, 2025
1 parent ba8bd8c commit e00cab5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,8 @@ elseif(${TARGET} STREQUAL "plugin")
target_link_libraries(${BINARY_NAME} PRIVATE kvm::kvm)
endif()

if(NOT CMAKE_SYSTEM MATCHES "Windows" AND NOT CMAKE_SYSTEM MATCHES "Darwin")
target_compile_options(${BINARY_NAME} PRIVATE -static-libstdc++)
endif()

endif() # TARGET

0 comments on commit e00cab5

Please sign in to comment.