blob: cb0c20d81fb2a6bd26e011874993e252d9358d05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
list(APPEND
THREADING_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/cpu.c
${CMAKE_CURRENT_SOURCE_DIR}/cpu.h
${CMAKE_CURRENT_SOURCE_DIR}/pool.c
${CMAKE_CURRENT_SOURCE_DIR}/pool.h
)
add_library(threading STATIC ${THREADING_SOURCES})
target_compile_options(threading PUBLIC ${CFLAGS})
target_link_libraries(threading PRIVATE Threads::Threads)
target_include_directories(threading PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|