Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2 KB

File metadata and controls

71 lines (51 loc) · 2 KB

Building with CMake

vcpkg dependencies

This project uses vcpkg to manage its dependencies, but this is optional. You may also install those dependencies manually or using any other package manager.

If you have vcpkg set up, then you have to provide some extra flags to the configure command, which differs only in how you provide the paths depending on your OS:

rem Windows
-D "CMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake"
# Unix based (Linux, macOS)
-D "CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"

You may also set the VCPKG_MANIFEST_FEATURES variable to magic-enum if you would like to enable support for it.

Build

Besides the ones for vcpkg dependencies (if you choose to provide them to the project using vcpkg), this project doesn't require any special command-line flags to build to keep things simple.

Here are the steps for building in release mode with a single-configuration generator, like the Unix Makefiles one:

cmake -S . -B build -D CMAKE_BUILD_TYPE=Release # vcpkg flags
cmake --build build

Here are the steps for building in release mode with a multi-configuration generator, like the Visual Studio ones:

cmake -S . -B build # vcpkg flags
cmake --build build --config Release

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 was added.

Here is the command for installing the release mode artifacts with a single-configuration generator, like the Unix Makefiles one:

cmake --install build

Here is the command for installing the release mode artifacts with a multi-configuration generator, like the Visual Studio ones:

cmake --install build --config Release