Enable src packages - edit /etc/apt/sources.list and un-comment lines starting with dev-src.

Install dependencies:

sudo apt update
sudo apt build-dep wesnoth
sudo apt install libcurl4-openssl-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libboost-all-dev libvorbis-dev libcairo2-dev libpango1.0-dev libssl-dev libreadline-dev cmake make scons pkgconf

Download the source code from https://wiki.wesnoth.org/Download, extract and compile.

tar -xf wesnoth-1.18.0.tar.bz2
cd wesnoth-1.18.0
scons wesnoth

To play the game, you don’t need to install it, simply run in from the same directory:

./wesnoth

Enjoy!