aboutsummaryrefslogtreecommitdiff
path: root/src/threading/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/threading/CMakeLists.txt')
-rw-r--r--src/threading/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/threading/CMakeLists.txt b/src/threading/CMakeLists.txt
new file mode 100644
index 0000000..b2bd203
--- /dev/null
+++ b/src/threading/CMakeLists.txt
@@ -0,0 +1,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}) \ No newline at end of file