From 1ea751050010b9e4ed8c47c333b96ff6e55ee783 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 7 Sep 2019 02:14:49 +0300 Subject: [PATCH] Update build instuctions for MSVC 2019 + 32-bit + new CMake. GitOrigin-RevId: 4860583c1fc22ef9f40cdcf602fd8e49410254e5 --- README.md | 2 +- build.html | 8 ++++++-- example/java/README.md | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8dd46792..80f316c0 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ cd cmake -DCMAKE_TOOLCHAIN_FILE=\scripts\buildsystems\vcpkg.cmake .. ``` -To build 64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A x64` to CMake. +To build 32-bit/64-bit `TDLib` using MSVC, you will need to additionally specify parameter `-A Win32`/`-A x64` to CMake. To build `TDLib` in Release mode using MSVC, you will need to additionally specify parameter `--config Release` to the `cmake --build .` command. diff --git a/build.html b/build.html index 9f6a9174..b7f1f94c 100644 --- a/build.html +++ b/build.html @@ -682,8 +682,12 @@ function onOptionsChanged() { if (!use_msvc) { options.push('-DCMAKE_BUILD_TYPE=' + (is_debug_build ? 'Debug' : 'Release')); } - if (build_64bit && use_msvc) { - options.push('-A x64'); + if (use_msvc) { + if (build_64bit) { + options.push('-A x64'); + } else { + options.push('-A Win32'); + } } return options; } diff --git a/example/java/README.md b/example/java/README.md index 560597de..5a7d12a1 100644 --- a/example/java/README.md +++ b/example/java/README.md @@ -11,7 +11,7 @@ cd jnibuild cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=../example/java/td .. cmake --build . --target install ``` -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. +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. In Windows, use Vcpkg toolchain file by adding parameter -DCMAKE_TOOLCHAIN_FILE=/scripts/buildsystems/vcpkg.cmake