From 653497534499380b7d8f4e02569cbfeaf342782e Mon Sep 17 00:00:00 2001
From: Florian Franzmann <bwlf@bandrate.org>
Date: Sun, 1 Dec 2019 17:59:23 +0100
Subject: [PATCH 16/35] Use canonical way of linking against pthreads

---
 CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcf4c62..f68fb92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,9 @@ set(TARGET_NAME hiberlite)
 include(sqlite)
 
 
-set(SOURCES
+find_package(Threads REQUIRED)
+
+set(SOURCES  
   src/BeanLoader.cpp
   src/BeanUpdater.cpp
   src/ChildKiller.cpp
@@ -67,7 +69,7 @@ target_include_directories(${TARGET_NAME}
 )
 
 target_link_libraries(${TARGET_NAME}
-  pthread
+  Threads::Threads
   dl
   ${LIBSQLITE}
   )
-- 
2.24.0

