Install. We strongly suggest letting the installer register git in your PATH and selecting Checkout as-is, Commit Unix LF option as the CR/LF behavior.
Fast way to get started but not suitable for serious development as only release configuration libraries are included.
Get the prebuilt wxWidgets dependencies used by OpenCPN's CI builds from wxWidgets-3.1.1.7z or from the SF mirror
Extract to somewhere on your disk.
(Optional, but recommended) Create the wxWIDGETS_ROOT_DIR environment variable with a value of the path to which the archive above was just extracted.
Building from source
All the command to be used have to be executed from x86 Native Tools Command Prompt for VS 2017 command prompt
Download the current source code release from https://github.com/wxWidgets/wxWidgets/releases (Read the instructions there, the Github source code zipball is not what you want) or clone the git repository (do not forget git submodule init and git submodule update to get the external dependencies)
(Optional, but recommended) Create/change the wxWIDGETS_ROOT_DIR environment variable with a value of the top level directory of your wxWidgets source tree.