Use cmake_dependent_option to better declare variables that relate on other variables
This commit is contained in:
parent
54f467eb47
commit
8fe48f3ca2
|
@ -97,7 +97,6 @@ jobs:
|
|||
-D CMAKE_CXX_FLAGS="-Werror" \
|
||||
-D CMAKE_EXE_LINKER_FLAGS="-s" \
|
||||
-D TDESKTOP_API_TEST=ON \
|
||||
-D DESKTOP_APP_USE_PACKAGED=OFF \
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
|
||||
$DEFINE
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@ jobs:
|
|||
-D CMAKE_C_FLAGS="-Werror" \
|
||||
-D CMAKE_CXX_FLAGS="-Werror" \
|
||||
-D TDESKTOP_API_TEST=ON \
|
||||
-D DESKTOP_APP_USE_PACKAGED=OFF \
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \
|
||||
$DEFINE
|
||||
|
||||
|
|
|
@ -149,7 +149,6 @@ jobs:
|
|||
call configure.bat ^
|
||||
${{ matrix.arch }} ^
|
||||
-D TDESKTOP_API_TEST=ON ^
|
||||
-D DESKTOP_APP_USE_PACKAGED=OFF ^
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF ^
|
||||
-D DESKTOP_APP_NO_PDB=ON ^
|
||||
%TDESKTOP_BUILD_DEFINE% ^
|
||||
|
|
|
@ -17,11 +17,13 @@ if (DESKTOP_APP_USE_PACKAGED)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
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)
|
||||
cmake_dependent_option(LIBTGVOIP_DISABLE_ALSA "Disable libtgvoip's ALSA backend." OFF LINUX ON)
|
||||
cmake_dependent_option(LIBTGVOIP_DISABLE_PULSEAUDIO "Disable libtgvoip's PulseAudio backend." OFF LINUX ON)
|
||||
|
||||
set(tgvoip_loc ${third_party_loc}/libtgvoip)
|
||||
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
option(TDESKTOP_API_TEST "Use test API credentials." OFF)
|
||||
set(TDESKTOP_API_ID "0" CACHE STRING "Provide 'api_id' for the Telegram API access.")
|
||||
set(TDESKTOP_API_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.")
|
||||
set(TDESKTOP_LAUNCHER_BASENAME "" CACHE STRING "Desktop file base name (Linux only).")
|
||||
|
||||
if (LINUX)
|
||||
set(TDESKTOP_LAUNCHER_BASENAME "" CACHE STRING "Desktop file base name.")
|
||||
endif()
|
||||
|
||||
if (TDESKTOP_API_TEST)
|
||||
set(TDESKTOP_API_ID 17349)
|
||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 9615515b069a1d3174fc45f9de69a23b616b80b3
|
||||
Subproject commit 50a67393abfc8b9d1fb69035dd373d394f78b477
|
|
@ -24,9 +24,7 @@ Go up to the `tdesktop` directory and run (using [your **api_id** and **api_hash
|
|||
tdesktop:centos_env \
|
||||
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
||||
-D TDESKTOP_API_ID=YOUR_API_ID \
|
||||
-D TDESKTOP_API_HASH=YOUR_API_HASH \
|
||||
-D DESKTOP_APP_USE_PACKAGED=OFF \
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF
|
||||
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||
|
||||
Or, to create a debug build, run (also using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
||||
|
||||
|
@ -36,9 +34,7 @@ Or, to create a debug build, run (also using [your **api_id** and **api_hash**](
|
|||
tdesktop:centos_env \
|
||||
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
||||
-D TDESKTOP_API_ID=YOUR_API_ID \
|
||||
-D TDESKTOP_API_HASH=YOUR_API_HASH \
|
||||
-D DESKTOP_APP_USE_PACKAGED=OFF \
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF
|
||||
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||
|
||||
The built files will be in the `out` directory.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Go to ***BuildPath*** and run
|
|||
|
||||
Go to ***BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
||||
|
||||
./configure.sh -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH -D DESKTOP_APP_USE_PACKAGED=OFF
|
||||
./configure.sh -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||
|
||||
Then launch Xcode, open ***BuildPath*/tdesktop/out/Telegram.xcodeproj** and build for Debug / Release.
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Open **x64 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath***
|
|||
|
||||
Go to ***BuildPath*\\tdesktop\\Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
||||
|
||||
configure.bat x64 -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH -D DESKTOP_APP_USE_PACKAGED=OFF -D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF
|
||||
configure.bat x64 -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||
|
||||
* Open ***BuildPath*\\tdesktop\\out\\Telegram.sln** in Visual Studio 2022
|
||||
* Select Telegram project and press Build > Build Telegram (Debug and Release configurations)
|
||||
|
|
|
@ -55,7 +55,7 @@ Open **x86 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath***
|
|||
|
||||
Go to ***BuildPath*\\tdesktop\\Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
||||
|
||||
configure.bat -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH -D DESKTOP_APP_USE_PACKAGED=OFF -D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF
|
||||
configure.bat -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||
|
||||
* Open ***BuildPath*\\tdesktop\\out\\Telegram.sln** in Visual Studio 2022
|
||||
* Select Telegram project and press Build > Build Telegram (Debug and Release configurations)
|
||||
|
|
Loading…
Reference in New Issue