mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Use return to decrease indentation in cmake files
This commit is contained in:
parent
f1244e19a1
commit
7c8d10022f
1 changed files with 183 additions and 184 deletions
|
@ -13,20 +13,20 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
|
||||||
if (TGVOIP_FOUND)
|
if (TGVOIP_FOUND)
|
||||||
target_link_libraries(lib_tgvoip INTERFACE PkgConfig::TGVOIP)
|
target_link_libraries(lib_tgvoip INTERFACE PkgConfig::TGVOIP)
|
||||||
|
return()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT TGVOIP_FOUND)
|
add_library(lib_tgvoip_bundled STATIC)
|
||||||
add_library(lib_tgvoip_bundled STATIC)
|
init_target(lib_tgvoip_bundled)
|
||||||
init_target(lib_tgvoip_bundled)
|
|
||||||
|
|
||||||
option(LIBTGVOIP_DISABLE_ALSA "Disable libtgvoip's ALSA 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)
|
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}
|
nice_target_sources(lib_tgvoip_bundled ${tgvoip_loc}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
BlockingQueue.cpp
|
BlockingQueue.cpp
|
||||||
BlockingQueue.h
|
BlockingQueue.h
|
||||||
Buffers.cpp
|
Buffers.cpp
|
||||||
|
@ -119,14 +119,14 @@ if (NOT TGVOIP_FOUND)
|
||||||
# POSIX
|
# POSIX
|
||||||
os/posix/NetworkSocketPosix.cpp
|
os/posix/NetworkSocketPosix.cpp
|
||||||
os/posix/NetworkSocketPosix.h
|
os/posix/NetworkSocketPosix.h
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(lib_tgvoip_bundled
|
target_compile_definitions(lib_tgvoip_bundled
|
||||||
PRIVATE
|
PRIVATE
|
||||||
TGVOIP_USE_DESKTOP_DSP
|
TGVOIP_USE_DESKTOP_DSP
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
target_compile_options(lib_tgvoip_bundled
|
target_compile_options(lib_tgvoip_bundled
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
@ -141,7 +141,7 @@ if (NOT TGVOIP_FOUND)
|
||||||
TGVOIP_NO_DSP
|
TGVOIP_NO_DSP
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
target_compile_definitions(lib_tgvoip_bundled
|
target_compile_definitions(lib_tgvoip_bundled
|
||||||
PUBLIC
|
PUBLIC
|
||||||
TARGET_OS_OSX
|
TARGET_OS_OSX
|
||||||
|
@ -153,7 +153,7 @@ if (NOT TGVOIP_FOUND)
|
||||||
TGVOIP_NO_OSX_PRIVATE_API
|
TGVOIP_NO_OSX_PRIVATE_API
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_library(lib_tgvoip_bundled_options INTERFACE)
|
add_library(lib_tgvoip_bundled_options INTERFACE)
|
||||||
target_compile_options(lib_tgvoip_bundled_options
|
target_compile_options(lib_tgvoip_bundled_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
@ -169,19 +169,19 @@ if (NOT TGVOIP_FOUND)
|
||||||
PRIVATE
|
PRIVATE
|
||||||
lib_tgvoip_bundled_options
|
lib_tgvoip_bundled_options
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(lib_tgvoip_bundled
|
target_include_directories(lib_tgvoip_bundled
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${tgvoip_loc}
|
${tgvoip_loc}
|
||||||
)
|
)
|
||||||
target_link_libraries(lib_tgvoip_bundled
|
target_link_libraries(lib_tgvoip_bundled
|
||||||
PRIVATE
|
PRIVATE
|
||||||
desktop-app::external_webrtc
|
desktop-app::external_webrtc
|
||||||
desktop-app::external_opus
|
desktop-app::external_opus
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
if (NOT LIBTGVOIP_DISABLE_ALSA)
|
if (NOT LIBTGVOIP_DISABLE_ALSA)
|
||||||
find_package(ALSA REQUIRED)
|
find_package(ALSA REQUIRED)
|
||||||
target_include_directories(lib_tgvoip_bundled SYSTEM PRIVATE ${ALSA_INCLUDE_DIRS})
|
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)
|
target_compile_definitions(lib_tgvoip_bundled PRIVATE WITHOUT_PULSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(lib_tgvoip
|
|
||||||
INTERFACE
|
|
||||||
lib_tgvoip_bundled
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(lib_tgvoip
|
||||||
|
INTERFACE
|
||||||
|
lib_tgvoip_bundled
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue