ESP32 Arduino: Set static IP address

How to setup a static IP address for our ESP32, using the Arduino core.