Fix windows build

This commit is contained in:
Andrea Cavalli 2023-05-14 01:34:16 +02:00
parent 95ac6c9b8f
commit e61da6af3d
3 changed files with 10 additions and 1 deletions

View File

@ -188,7 +188,7 @@ jobs:
if: matrix.os == 'windows-2019'
run: |
set -xeo pipefail
$VCPKG_DIR/vcpkg install gperf openssl:x64-windows-static zlib:x64-windows-static
./vcpkg/vcpkg install gperf openssl:x64-windows-static zlib:x64-windows-static
shell: bash
- name: Build
shell: bash

View File

@ -22,6 +22,7 @@ cmake \
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
-DOPENSSL_USE_STATIC_LIBS=True \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ \
-DCMAKE_C_FLAGS_RELEASE="" \
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
-DTD_ENABLE_LTO=OFF \
@ -51,6 +52,7 @@ cmake \
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
-DOPENSSL_USE_STATIC_LIBS=True \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ \
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
-DTD_ENABLE_LTO=ON \
-DTD_ENABLE_JNI=ON \

View File

@ -15,6 +15,10 @@ else
CCACHE=$(which ccache)
fi
# Fix path
export PATH="$PATH:/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM"
export VCPKG_DIR="$(readlink -e ./vcpkg)"
# Build tdlib tools
cd implementations/tdlight/td_tools_build
cmake \
@ -22,6 +26,7 @@ cmake \
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
-DOPENSSL_USE_STATIC_LIBS=True \
-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON \
-DCMAKE_C_FLAGS_RELEASE="" \
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
-DTD_ENABLE_LTO=OFF \
@ -51,6 +56,7 @@ cmake \
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
-DOPENSSL_USE_STATIC_LIBS=True \
-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON \
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
-DTD_ENABLE_LTO=ON \
-DTD_ENABLE_JNI=ON \
@ -66,6 +72,7 @@ cmake \
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
-DOPENSSL_USE_STATIC_LIBS=True \
-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON \
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate/Release)" \
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
-DTD_ENABLE_LTO=ON \