Skip to content

Commit 9050804

Browse files
committed
链接pthread
1 parent 22fa020 commit 9050804

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ if(BuildCodeFormat)
2626
endif()
2727

2828
if(BuildCodeFormatServer)
29-
#add_subdirectory(CodeFormatServer)
29+
add_subdirectory(CodeFormatServer)
3030
endif()
31-
add_subdirectory(CodeFormatServer)

CodeFormatServer/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ target_sources(CodeFormatServer
4343

4444
target_link_libraries(CodeFormatServer PUBLIC CodeService)
4545

46-
#if(WIN32)
47-
# target_link_libraries(CodeFormatServer PUBLIC -lwsock32 -lws2_32)
48-
#endif()
46+
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
47+
target_link_libraries(CodeFormatServer PUBLIC pthread)
48+
endif()
49+
50+
install(
51+
TARGETS CodeFormatServer
52+
LIBRARY DESTINATION lib
53+
RUNTIME DESTINATION bin
54+
)

0 commit comments

Comments
 (0)