From 60f52a14d21cbdd4056122f0ddc36a6436cad887 Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 29 Apr 2025 11:53:37 +0800 Subject: [PATCH] =?UTF-8?q?tss-http:=20=E6=B7=BB=E5=8A=A0musl=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=93=BE=E6=8E=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/http-server/CMakeLists.txt b/http-server/CMakeLists.txt index 5259ff1..80d2873 100644 --- a/http-server/CMakeLists.txt +++ b/http-server/CMakeLists.txt @@ -8,4 +8,15 @@ if (MSVC) add_compile_options(/source-charset:utf-8) endif() -add_executable(tss-http main.cpp) \ No newline at end of file +add_executable(tss-http main.cpp) +if(UNIX) +execute_process( + COMMAND uname -a + OUTPUT_VARIABLE UNAME_OUT + OUTPUT_STRIP_TRAILING_WHITESPACE +) +if(UNAME_OUT MATCHES "alpine" OR UNAME_OUT MATCHES "Alpine") +message(STATUS "tss-http on musl static link") +target_link_libraries(tss-http PRIVATE -static;-static-libstdc++) +endif() +endif() \ No newline at end of file