NanoBoyAdvance can be compiled on Windows, Linux and macOS.
- Clang or G++ with C++17 support
- CMake 3.2 or higher
- OpenGL (usually provided by the operating system)
- SDL2 library
- GLEW library
- Qt5 library
Clone the Git repository with submodules:
git clone --recursive https://github.com/nba-emu/NanoBoyAdvance.git
The way that you install the dependencies will vary depending on the distribution you use.
Typically you'll have to invoke the install command of some package manager.
Here is a list of commands for popular distributions and macOS:
pacman -S cmake sdl2 glew qt5-base
apt install cmake libsdl2-dev libglew-dev qtbase5-dev libqt5opengl5-dev
Get Brew and run:
brew install cmake sdl2 glew qt@5
su
pkg install cmake git sdl2 glew qt5 qt5-opengl
cd /somewhere/on/your/system/NanoBoyAdvance
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
NOTE: the location and name of the build
directory is arbitrary.
Just run make:
make
or to use multiple processor cores:
make -jNUMBER_OF_CORES
Binaries will be output to build/bin/
This guide uses MSYS2 to install Mingw-w64 and other dependencies.
In your MSYS2 command line run:
pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-glew mingw-w64-x86_64-qt5-static
cd path/to/NanoBoyAdvance
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
NOTE: the location and name of the build
directory is arbitrary.
Just run make:
make
or to use multiple processor cores:
make -jNUMBER_OF_CORES
Binaries will be output to build/bin/