mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Use return to decrease indentation in cmake files
This commit is contained in:
@@ -13,20 +13,20 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||
|
||||
if (TGVOIP_FOUND)
|
||||
target_link_libraries(lib_tgvoip INTERFACE PkgConfig::TGVOIP)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TGVOIP_FOUND)
|
||||
add_library(lib_tgvoip_bundled STATIC)
|
||||
init_target(lib_tgvoip_bundled)
|
||||
add_library(lib_tgvoip_bundled STATIC)
|
||||
init_target(lib_tgvoip_bundled)
|
||||
|
||||
option(LIBTGVOIP_DISABLE_ALSA "Disable libtgvoip's ALSA backend (Linux only)." OFF)
|
||||
option(LIBTGVOIP_DISABLE_PULSEAUDIO "Disable libtgvoip's PulseAudio backend (Linux only)." OFF)
|
||||
option(LIBTGVOIP_DISABLE_ALSA "Disable libtgvoip's ALSA backend (Linux only)." OFF)
|
||||
option(LIBTGVOIP_DISABLE_PULSEAUDIO "Disable libtgvoip's PulseAudio backend (Linux only)." OFF)
|
||||
|
||||
set(tgvoip_loc ${third_party_loc}/libtgvoip)
|
||||
set(tgvoip_loc ${third_party_loc}/libtgvoip)
|
||||
|
||||
nice_target_sources(lib_tgvoip_bundled ${tgvoip_loc}
|
||||
PRIVATE
|
||||
nice_target_sources(lib_tgvoip_bundled ${tgvoip_loc}
|
||||
PRIVATE
|
||||
BlockingQueue.cpp
|
||||
BlockingQueue.h
|
||||
Buffers.cpp
|
||||
@@ -119,14 +119,14 @@ if (NOT TGVOIP_FOUND)
|
||||
# POSIX
|
||||
os/posix/NetworkSocketPosix.cpp
|
||||
os/posix/NetworkSocketPosix.h
|
||||
)
|
||||
)
|
||||
|
||||
target_compile_definitions(lib_tgvoip_bundled
|
||||
PRIVATE
|
||||
target_compile_definitions(lib_tgvoip_bundled
|
||||
PRIVATE
|
||||
TGVOIP_USE_DESKTOP_DSP
|
||||
)
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
if (WIN32)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_compile_options(lib_tgvoip_bundled
|
||||
PRIVATE
|
||||
@@ -141,7 +141,7 @@ if (NOT TGVOIP_FOUND)
|
||||
TGVOIP_NO_DSP
|
||||
)
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
elseif (APPLE)
|
||||
target_compile_definitions(lib_tgvoip_bundled
|
||||
PUBLIC
|
||||
TARGET_OS_OSX
|
||||
@@ -153,7 +153,7 @@ if (NOT TGVOIP_FOUND)
|
||||
TGVOIP_NO_OSX_PRIVATE_API
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
else()
|
||||
add_library(lib_tgvoip_bundled_options INTERFACE)
|
||||
target_compile_options(lib_tgvoip_bundled_options
|
||||
INTERFACE
|
||||
@@ -169,19 +169,19 @@ if (NOT TGVOIP_FOUND)
|
||||
PRIVATE
|
||||
lib_tgvoip_bundled_options
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(lib_tgvoip_bundled
|
||||
PUBLIC
|
||||
target_include_directories(lib_tgvoip_bundled
|
||||
PUBLIC
|
||||
${tgvoip_loc}
|
||||
)
|
||||
target_link_libraries(lib_tgvoip_bundled
|
||||
PRIVATE
|
||||
)
|
||||
target_link_libraries(lib_tgvoip_bundled
|
||||
PRIVATE
|
||||
desktop-app::external_webrtc
|
||||
desktop-app::external_opus
|
||||
)
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
if (LINUX)
|
||||
if (NOT LIBTGVOIP_DISABLE_ALSA)
|
||||
find_package(ALSA REQUIRED)
|
||||
target_include_directories(lib_tgvoip_bundled SYSTEM PRIVATE ${ALSA_INCLUDE_DIRS})
|
||||
@@ -212,10 +212,9 @@ if (NOT TGVOIP_FOUND)
|
||||
|
||||
target_compile_definitions(lib_tgvoip_bundled PRIVATE WITHOUT_PULSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(lib_tgvoip
|
||||
INTERFACE
|
||||
lib_tgvoip_bundled
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(lib_tgvoip
|
||||
INTERFACE
|
||||
lib_tgvoip_bundled
|
||||
)
|
||||
|
Reference in New Issue
Block a user