From 2b21545845221a841c11db2c3b4782f6893e72d7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 15 Mar 2016 19:25:33 -0500 Subject: use cmake's find_package(Threads) output everywhere instead of just in src/ --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') 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} -- cgit v1.2.3