From: Roger Shimizu <rogershimizu@gmail.com>
Date: Tue, 19 Jul 2016 23:26:12 +0900
Subject: support cmake threads

Cherry-Pick a few changes from John Zachary's own github repo
to support CMake Threads

Thanks to great support from one of the original author of this library,
John Zachary <jzachary@jzachary.net>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8beff72..f9bf03b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,9 @@ else(BASE_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-dev)?$")
     message(FATAL_ERROR "Invalid version number: ${VERSION}")
 endif(BASE_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-dev)?$")
 
+find_package(Threads)
+set(THREADS_LDFLAGS "${CMAKE_THREAD_LIBS_INIT}")
+
 #-----------------------------------------------------------------------
 # Set some options
 
