1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 19:54:57 +08:00
serial/cmake/Findpthread.cmake

11 lines
281 B
CMake
Raw Normal View History

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if(Threads_FOUND)
#message( "lib pthread FOUND!" )
set(pthread_LIBRARIES Threads::Threads)
set(pthread_INCLUDE_DIRS ${Threads_INCLUDE_DIR})
else(Threads_FOUND)
#message( "lib pthread NOT FOUND!" )
endif()