aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-15 19:25:33 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-03-15 19:25:33 -0500
commit2b21545845221a841c11db2c3b4782f6893e72d7 (patch)
tree9b77232971314d2aad2614592a3ca98d71b78611 /CMakeLists.txt
parent8ddb1713fa0816ea1c98ae039fea181d629acc7d (diff)
downloadayatana-indicator-display-2b21545845221a841c11db2c3b4782f6893e72d7.tar.gz
ayatana-indicator-display-2b21545845221a841c11db2c3b4782f6893e72d7.tar.bz2
ayatana-indicator-display-2b21545845221a841c11db2c3b4782f6893e72d7.zip
use cmake's find_package(Threads) output everywhere instead of just in src/
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}