Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Blomqvist <janne.blomqvist@aalto.fi>2017-09-13 17:43:12 +0300
committerJanne Blomqvist <janne.blomqvist@aalto.fi>2017-09-13 17:43:12 +0300
commitf739af1e43e0005971641738f588f28c9abae08d (patch)
treef0ea0f6a8456e270ff90b7a3daa086fe31690d9a /remmina-plugins
parent205df66325b566d2ae5f87f8a68f9d829765d4d5 (diff)
Simplify pthreads library detection
Use the cmake builtin Threads library detection, and bail out if it wasn't pthreads. This allows deleting the cmake/FindPTHREAD.cmake file which complains because pthreads doesn't provide a pkg-config file. In newer versions of cmake the FindThreads module has the THREADS_PREFER_PTHREAD_FLAG variable and creates a Threads::Threads import target. However, in order top remain compatible with older cmake version this is not used.
Diffstat (limited to 'remmina-plugins')
-rw-r--r--remmina-plugins/CMakeLists.txt2
-rw-r--r--remmina-plugins/rdp/CMakeLists.txt4
2 files changed, 3 insertions, 3 deletions
diff --git a/remmina-plugins/CMakeLists.txt b/remmina-plugins/CMakeLists.txt
index c5913c74d..945755983 100644
--- a/remmina-plugins/CMakeLists.txt
+++ b/remmina-plugins/CMakeLists.txt
@@ -44,7 +44,7 @@ set(APPICON16_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/16x16/emblems")
set(APPICON22_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/22x22/emblems")
set(REMMINA_COMMON_INCLUDE_DIRS ${GTK_INCLUDE_DIRS})
-set(REMMINA_COMMON_LIBRARIES ${GTK_LIBRARIES} ${PTHREAD_LIBRARY})
+set(REMMINA_COMMON_LIBRARIES ${GTK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
find_suggested_package(LIBSSH)
if(LIBSSH_FOUND)
diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt
index c8a188545..2a8a47a15 100644
--- a/remmina-plugins/rdp/CMakeLists.txt
+++ b/remmina-plugins/rdp/CMakeLists.txt
@@ -32,8 +32,8 @@
# files in the program, then also delete it here.
-set(CMAKE_THREAD_PREFER_PTHREAD)
-find_package(Threads)
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+find_package(Threads REQUIRED)
find_package(X11)
set(REMMINA_PLUGIN_RDP_SRCS