aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fürmetz <fuermetz@mailbox.org>2017-11-22 10:12:22 +0100
committerLukas Fürmetz <fuermetz@mailbox.org>2017-11-22 10:12:22 +0100
commit3e6529f16a20b71f7f2050b5db833ec4941ade44 (patch)
tree9106ae24cfdad1650abc0df23110f0d7e43441f8
parent31db3e6a75b98d64c52fcf989bb09e7486caa1fd (diff)
Link libpthread into modulelink_pthread
-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>