Skip to content

Commit 1ea7510

Browse files
committed
Update build instuctions for MSVC 2019 + 32-bit + new CMake.
GitOrigin-RevId: 4860583c1fc22ef9f40cdcf602fd8e49410254e5
1 parent 6cbc02e commit 1ea7510

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ cd <path to vcpkg>
118118
cmake -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg>\scripts\buildsystems\vcpkg.cmake ..
119119
```
120120

121-
To build 64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A x64` to CMake.
121+
To build 32-bit/64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A Win32`/`-A x64` to CMake.
122122
To build `TDLib` in Release mode using MSVC, you will need to additionally specify parameter `--config Release` to the `cmake --build .` command.
123123

124124
<a name="linux"></a>

‎build.html‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,12 @@
682682
if (!use_msvc) {
683683
options.push('-DCMAKE_BUILD_TYPE=' + (is_debug_build ? 'Debug' : 'Release'));
684684
}
685-
if (build_64bit && use_msvc) {
686-
options.push('-A x64');
685+
if (use_msvc) {
686+
if (build_64bit) {
687+
options.push('-A x64');
688+
} else {
689+
options.push('-A Win32');
690+
}
687691
}
688692
return options;
689693
}

‎example/java/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cd jnibuild
1111
cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=../example/java/td ..
1212
cmake --build . --target install
1313
```
14-
If you want to compile TDLib for 64-bit Java on Windows using MSVC, you will also need to add `-A x64` option to CMake.
14+
If you want to compile TDLib for 32-bit/64-bit Java on Windows using MSVC, you will also need to add `-A Win32`/`-A x64` option to CMake.
1515

1616
In Windows, use Vcpkg toolchain file by adding parameter -DCMAKE_TOOLCHAIN_FILE=<VCPKG_DIR>/scripts/buildsystems/vcpkg.cmake
1717

0 commit comments

Comments
 (0)