Skip to main content

Building SGCT from source

The requirements for building SGCT are:

  • CMake version 4.0 or above
  • C++ compiler supporting C++23 (Visual Studio 2016 18, GCC 15, or Clang 21)
  • vcpkg installation

CMake can be downloaded and installed from a package manager (winget, apt, yum, etc) or from the CMake homepage.

SGCT uses vcpkg for dependency management. It needs to be installed to be able to compile SGCT and use it in any application. This page contains detailed information how to install it for different operating systems. Note: It is also advised to define VCPKG_DEFAULT_BINARY_CACHE as an environment variable and point it to a folder on disk that will be used as a vcpkg cache. This setting overrides where compiled dependencies will be cached and we recommend to place that cache next to the vcpkg install (for example, if C:/vcpkg is the vcpkg install directory, use C:/vcpkg-cache).

  1. Clone the SGCT repository (git clone https://github.com/sgct/sgct)
  2. Start CMake and drag in the CMakeLists.txt file from the SGCT folder
  3. Select a preset
  4. Press the "Configure" button
  5. Press the "Generate" button
  6. If it exists "Open Project" to open the project file in your IDE
  7. Compile