Commit Graph

4 Commits (8f3c7a0b388499503876cd364587b7c80fa5e5d3)

Author SHA1 Message Date
Lev Stipakov 271648c6c3 cmake: replace Ninja generator with MSVC
Ninja makes build slightly faster but requires running
"x64" developer command prompt, not the "default" one.
Without that, cmake silenly produces x86 binaries and it might
take a while to find out the reason. To avoid confusion, switch back
to MSVC generator.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-31 11:56:30 +03:00
Lev Stipakov a85bba9654 CMakePresets: fix arm64 debug/release config
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-26 21:21:45 +03:00
Lev Stipakov 09aa7ef730 CMakePresets.json: use MSVC generator for ARM64 builds
Sadly, CMake/Ninja combo doesn't work well for ARM64
(similar to
https://stackoverflow.com/questions/47581784/building-a-x86-application-with-cmake-ninja-and-clang-on-x64-windows)
- it silently produces x64 binaries instead of arm64.

Switch to slower MSVC generator.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-26 16:24:13 +03:00
Lev Stipakov b6f26818a9 Use vcpkg manifest and cmake presets
Manifest is a convenient way to automatically
install dependencies. Since we have to support
both OpenSSL 1.1.1 (for OpenVPN 2.5) and OpenSSL 3
(for coming OpenVPN 2.6) and manifest file name
is hardcoded, we create two manifests and put them
into different directories.

To simplify build process, define configuration presets
for arch (x86/x64/arm64), debug/release and oss1.1.1/ossl3.

This way building is greatly simplified:

  cmake -S . --preset x64-debug-ossl3
  cmake --build --preset x64-debug-ossl3

Update GitHub Actions script accordingly.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-24 14:20:51 +03:00