aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--vterm-module.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8953e4..21d8551 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,11 @@ target_link_libraries(vterm-module vterm)
# Link with libutil
target_link_libraries(vterm-module util)
+# Link with pthread
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+target_link_libraries(vterm-module Threads::Threads)
+
# We need the right emacs-module header
set(EMACS_SOURCE "" CACHE PATH "Path to emacs source.")
diff --git a/vterm-module.h b/vterm-module.h
index b971592..477ad01 100644
--- a/vterm-module.h
+++ b/vterm-module.h
@@ -3,6 +3,7 @@
#include <emacs-module.h>
#include <inttypes.h>
+#include <pthread.h>
#include <stdbool.h>
#include <vterm.h>