in my personal experience, installing vcpkg as a package was a pain in the ■■■■■■■ ■■■ - it didnt work or told me to ■■■■ off, basically
instead, use the path for “DCMAKE_TOOLCHAIN_FILE=” of where you cloned vcpkg to
NOTE: original updated info + nixOS specific tips can be found here (click)…
but first, install all the necessary build packages:
pkg-config
autoconf
automake
openssl
curl
make
cmake
glibc
perl
nss
gcc
g++
(names may vary)
cd Downloads
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh --disableMetrics
^ your vcpkg is now ready
…
cd to BeamMP-Launcher (that you also cloned)
CHOOSE ONE OF:
cmake . -B bin -DCMAKE_TOOLCHAIN_FILE="~/Downloads/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux
^ toolchain is of absolute path and must be to your freshly git cloned vcpkg!
^ debug version (developers)
cmake -DCMAKE_BUILD_TYPE=Release . -B bin -DCMAKE_TOOLCHAIN_FILE="~/Downloads/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux
^ normal version (performance)
CHOOSE ONE OF:
cmake --build bin --parallel
^ debug version (developers)
cmake --build bin --parallel --config Release
^ normal version (performance)
yeah it’s pretty sneaky, this error, i had the same situation. frantically googling “how to setup vcpkg for compiling” and ■■■■. were you to try to blindly follow the instructions from beamMP’s github or the beamMP on linux guides:
CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:152 (message):
Could not find toolchain file: ~/vcpkg/scripts/buildsystems/vcpkg.cmake
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
the official instructions DO need to be more precise, though. it’s a miracle that we even have a linux userbase for a game that runs only on X11. but that’s a story for another time…
EDIT: months later i realise that OP had a different problem this whole time, but i say, i roll with this one anyway, cos its still kinda relevant, right?
EDIT2: i ■■■■■■■ ■■■■■■ up with the paths lol. sorry about that. fixed