Move CMAKE_DL_LIBS to libtgvoip cmake file and add missed pthread

Remove unneeded minizip include directory from cmake

Remove unneeded compile definations

Opus is needed only by libtgvoip
This commit is contained in:
Ilya Fedin 2020-05-02 09:57:37 +04:00 committed by John Preston
parent 3135463017
commit 27f6c8ce62
2 changed files with 8 additions and 14 deletions

View file

@ -126,10 +126,6 @@ PRIVATE
desktop-app::external_openal desktop-app::external_openal
) )
if (NOT DESKTOP_APP_USE_PACKAGED)
target_link_libraries(Telegram PRIVATE desktop-app::external_opus)
endif()
# Telegram uses long atomic types, so on some architectures libatomic is needed. # Telegram uses long atomic types, so on some architectures libatomic is needed.
check_cxx_source_compiles(" check_cxx_source_compiles("
#include <atomic> #include <atomic>
@ -146,7 +142,6 @@ if (DESKTOP_APP_USE_PACKAGED)
target_link_libraries(Telegram target_link_libraries(Telegram
PRIVATE PRIVATE
${CMAKE_DL_LIBS}
Threads::Threads Threads::Threads
) )
endif() endif()
@ -1183,21 +1178,12 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/Telegram PREFIX Resources FILES ${
target_include_directories(Telegram PRIVATE ${src_loc}) target_include_directories(Telegram PRIVATE ${src_loc})
if (NOT DESKTOP_APP_USE_PACKAGED)
target_include_directories(Telegram PRIVATE ${third_party_loc}/minizip)
endif()
target_compile_definitions(Telegram target_compile_definitions(Telegram
PRIVATE PRIVATE
TDESKTOP_API_ID=${TDESKTOP_API_ID} TDESKTOP_API_ID=${TDESKTOP_API_ID}
TDESKTOP_API_HASH=${TDESKTOP_API_HASH} TDESKTOP_API_HASH=${TDESKTOP_API_HASH}
AL_ALEXT_PROTOTYPES
) )
if (NOT DESKTOP_APP_USE_PACKAGED)
target_compile_definitions(Telegram PRIVATE AL_LIBTYPE_STATIC)
endif()
if (${CMAKE_GENERATOR} MATCHES "(Visual Studio|Xcode)") if (${CMAKE_GENERATOR} MATCHES "(Visual Studio|Xcode)")
set(output_folder ${CMAKE_BINARY_DIR}) set(output_folder ${CMAKE_BINARY_DIR})
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "") elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "")

View file

@ -790,4 +790,12 @@ else()
desktop-app::external_openssl desktop-app::external_openssl
desktop-app::external_opus desktop-app::external_opus
) )
if (LINUX)
target_link_libraries(lib_tgvoip
PRIVATE
${CMAKE_DL_LIBS}
pthread
)
endif()
endif() endif()