From b25df92d35d4dc6dd3faa0fb98439e6546b6139c Mon Sep 17 00:00:00 2001 From: crackedmind Date: Mon, 18 Dec 2017 07:53:24 +0300 Subject: [PATCH] Link in threading libraries if necessary --- CMakeLists.txt | 3 +++ Telegram/CMakeLists.txt | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f9ed6f99..27eec807f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,9 @@ else(LINUX) set(OPENAL_LIBRARY OpenAL::OpenAL) endif(LINUX) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads) + find_package(ZLIB REQUIRED) find_package(FFmpeg REQUIRED) find_package(Opus REQUIRED) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 9a627c974..f76399cb5 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -696,6 +696,8 @@ if (LINUX) target_link_libraries(Telegram Qt5::DBus dl ${ALSA_LIBRARIES} ${PULSEAUDIO_LIBRARIES}) endif() +target_link_libraries(Telegram Threads::Threads) + set_target_properties(Telegram PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT SourceFiles/stdafx.h