Skip to content

Commit

Permalink
Fixed Windows build documentation
Browse files Browse the repository at this point in the history
S
  • Loading branch information
maxirmx authored and ronaldtse committed Dec 8, 2023
1 parent a3b7496 commit 800dd77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/windows-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,3 @@ jobs:
mkdir -p "build/Testing/Temporary"
cp "cmake/CTestCostData.txt" "build/Testing/Temporary"
ctest --parallel ${{ env.CORES }} --test-dir build -C Release --output-on-failure
# Local build hints:
# cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
# cmake -B build -G "Visual Studio 16 2019" -A x64 -T v142 -DENABLE_SANITIZERS=OFF -DBUILD_SHARED_LIBS=OFF -DCRYPTO_BACKEND=botan -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .
# set PATH=C:\vcpkg\installed\x64-windows\bin;%PATH%
18 changes: 14 additions & 4 deletions docs/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ make && make install

=== Using Microsoft Visual Studio 2019 and vcpkg

Use appropriate command propmpt for your target platform, for example "x64 Native Tools Command Prompt for VS 2019"
```
cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
```

Install `vcpkg` according to
https://docs.microsoft.com/en-us/cpp/build/install-vcpkg?view=msvc-160&tabs=windows[these instructions]:

Expand All @@ -203,8 +208,8 @@ If you need to target 32-bit platform you'll need to to replace `x64-windows` wi
----
cmake -B build -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake \
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -DCRYPTO_BACKEND="botan" .
cmake --build . --config Release
cmake --install .
cmake --build build --config Release
cmake --install build
----
--
Replace CRYPTO_BACKEND parameter to "openssl" if you target this backend.
Expand All @@ -220,6 +225,11 @@ Ensure that the following dependencies are available on path:

=== Using Microsoft Visual Studio 2019 and pre-installed libraries

Use appropriate command propmpt for your target platform, for example "x64 Native Tools Command Prompt for VS 2019"
```
cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
```

Install dependencies and make them available either on PATH or using CMAKE_TARGET_PREFIX parameter:

* Botan(2.14+) or Crypto (OpenSSL 1.1.1+) depending on target backend
Expand All @@ -238,8 +248,8 @@ In such case use OPENSSL_ROOT_DIR.
----
cmake -B build -G "Visual Studio 16 2019" -A x64 -DOPENSSL_ROOT_DIR=<openssl root> -DCMAKE_TARGET_PREFIX=<target prefix> \
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off -DCRYPTO_BACKEND="botan" .
cmake --build . --config Release
cmake --install .
cmake --build build --config Release
cmake --install build
----
--
Replace CRYPTO_BACKEND parameter to "openssl" if you target this backend, use OPENSSL_ROOT_DIR and CMAKE_TARGET_PREFIX optionally as explained above

0 comments on commit 800dd77

Please sign in to comment.