aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3230a2b..9302542 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,10 +32,18 @@ set(CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_P
## Check for prerequisites
##
+# threads...
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.1)
+ set(THREAD_LINK_LIBRARIES -pthread)
+else()
+ set(THREAD_LINK_LIBRARIES Threads::Threads) # introduced in cmake 3.1
+endif()
+
find_package(PkgConfig REQUIRED)
+# glib...
set(GLIB_MINIMUM 2.36)
pkg_check_modules(SERVICE_DEPS REQUIRED
gio-unix-2.0>=${GLIB_MINIMUM}