# Building with CMake ## Build This project doesn't require any special command-line flags to build to keep things simple. If you're building without internet or on Guix System then use `-DGUIX=1` Here are the steps for building in release mode with a single-configuration generator, like the Unix Makefiles one: ```sh cmake -S . -B build -D CMAKE_BUILD_TYPE=Release cmake --build build ``` ### Building with MSVC / Windows MSVC is not supported because it has an outdated C++ compiler. Use Mingw64 to build. ### Building with MinGW / Windows - Download cmake and generate a mingw make file. - Install or download marisa-trie package. Use MinGW to build it. After generating build directory enter it and execute ```sh pacman -S mingw-w64-x86_64-marisa cd build mingw32-make.exe make mingw32-make.exe install ``` Or use Cmake. ```sh pacman -S mingw-w64-x86_64-marisa cmake -S . -B build ``` ###### Windows FAQ: >Q: Still doesn't work!!! > >A: Download [Installer][3] here. >Q: Where should I install it!!! > >A: Into Goldendict-ng root directory. Don't forget about "marisa_words.dic" ### Building on Apple Silicon CMake supports building on Apple Silicon properly since 3.20.1. Make sure you have the [latest version][1] installed. #FIXME Mac Support Instructions Building on Apple devices is not supported yet. But you can try. ## Install This project doesn't require any special command-line flags to install to keep things simple. As a prerequisite, the project has to be built with the above commands already. The below commands require at least CMake 3.15 to run, because that is the version in which [Install a Project][2] was added. Here is the command for installing the release mode artifacts with a single-configuration generator, like the Unix Makefiles one: ```sh cmake --install build ``` Here is the command for installing the release mode artifacts with a multi-configuration generator, like the Visual Studio ones: ```sh cmake --install build --config Release ``` [1]: https://cmake.org/download/ [2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project [3]: https://www.mediafire.com/file/h1v7owj7np9j7wg/gd-tools_windows.zip/file