ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.15k stars 156 forks source link

Build process improvements to facilitate offline builds #441

Open Cimbali opened 10 months ago

Cimbali commented 10 months ago

I have a build process where the system is required to be offline (I think it’s the case for many distros package building?). While it’s easy enough to vendor all the go and vcpkg dependencies, I’m proposing 2 changes here in the build configuration which change nothing to the current process but greatly facilitate building offline.

  1. Enable cmake to not download googletests from cmake but instead look for it on the system. This is also setting INSTALL_GTEST to OFF to avoid installing test files.
  2. Stop cmake from looking for a vcpkg binary during CMake as it’s only used before in build.sh/build.ps1. As long as the dependent libraries are found (downloaded from build scripts, or in my case vendored) no additional checks are needed. Similarly I moved the toolchain file definition to said build script.