From 6f1c1fd070908f25dbb80894a7ca1c70403e49d7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 24 Feb 2020 21:14:19 +0400 Subject: [PATCH] Fix packaged build --- Telegram/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 2125bd45a..a760408dd 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -66,17 +66,6 @@ generate_numbers(Telegram ${res_loc}/numbers.txt) set_target_properties(Telegram PROPERTIES AUTOMOC ON AUTORCC ON) -if (DESKTOP_APP_USE_PACKAGED) - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads) - - target_link_libraries(Telegram - PRIVATE - ${CMAKE_DL_LIBS} - Threads::Threads - ) -endif() - if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) target_link_libraries(Telegram PRIVATE @@ -128,6 +117,17 @@ if (NOT HAVE_LONG_ATOMIC_WITHOUT_LIB) target_link_libraries(Telegram PRIVATE atomic) endif() +if (DESKTOP_APP_USE_PACKAGED) + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + find_package(Threads) + + target_link_libraries(Telegram + PRIVATE + ${CMAKE_DL_LIBS} + Threads::Threads + ) +endif() + target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h) nice_target_sources(Telegram ${src_loc} PRIVATE