-
-
Notifications
You must be signed in to change notification settings - Fork 223
Compiling on Ubuntu 22.04
Majesty edited this page Feb 3, 2023
·
3 revisions
- Ubuntu 22.04
The following command will install Git, CMake, a compiler and the libraries used by OtClient.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update
sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build libglew-dev libx11-dev ccache linux-headers-$(uname -r)
Update cmake
sudo apt remove --purge cmake
hash -r
sudo apt install snapd
sudo snap install cmake --classic
cmake --version
Install vcpkg
cd ~
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
git clone --depth 1 https://github.com/mehah/otclient.git
cd otclient
git checkout main
.
├── otclient
└── vcpkg
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-release
cmake --build linux-release
-- Running vcpkg install
This step will take a long time on the first run, as it needs to download and install all the dependencies, so be patient!