Building nyan
October 17, 2023 ยท View on GitHub
This project requires a C++20 compiler (e.g gcc >= 10 or clang >= 10) and
uses flex and cmake.
Dependencies
Ubuntu 20.04 or later
sudo apt-get update
sudo apt-get install cmake flex make
For gcc: sudo apt-get install gcc g++
For clang: sudo apt-get install clang
Archlinux
sudo pacman -Syu --needed cmake flex make clang gcc
Gentoo
sudo emerge -avt cmake flex make
Windows
- CMake
- Visual Studio 2017 Community edition
- flex
- The path to win_flex.exe needs to be added to the PATH environment variable
Clone this repository
git clone https://github.com/SFTtech/nyan.git
Build
This project is built like every standard cmake project. It boils down to:
cd nyan
mkdir build
cd build
cmake ..
make -j$(nproc)
Note: on windows the last command is
cmake --build . --config RelWithDebInfo
Note: if nyan can't find flex add -DFLEX_EXECUTABLE=path/to/win_flex.exe to the cmake configure command.
cmake registers the project in the user package registry.
Other projects can therefore easily find nyan without installing it
(no sudo make install needed).
find_package(nyan CONFIG REQUIRED) will directly provide nyan::nyan as a
target to link to (with its include directories etc).