Fix the issue where compiling on Linux does not link to the pthread library.

This commit is contained in:
dxl
2025-01-17 12:44:04 +08:00
parent c771ae937b
commit 6439b25500
+2 -1
View File
@@ -35,7 +35,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_compile_options(-D_GNU_SOURCE)
find_package(Threads)
find_package(Threads REQUIRED)
set(LIBTHREAD pthread)
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
MESSAGE(STATUS "Run on Windows.")