aboutsummaryrefslogtreecommitdiff
path: root/src/threading/CMakeLists.txt
blob: b2bd2031c0adb7109c7598312c2281eb1b0d391c (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})