Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 86c3a47

Browse files
committed
使得 examples 可以在 linux 上构建;
1 parent 610927b commit 86c3a47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ endif(MSVC)
1010
macro(api_exe target)
1111
add_executable(${target} ${target}.cpp)
1212
target_link_libraries(${target} mirai-cpp)
13+
# gcc 要连接 pthread
14+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
15+
target_link_libraries(${target} pthread)
16+
endif()
1317
endmacro()
1418

1519
api_exe(RepeatMessage)

0 commit comments

Comments
 (0)