Running your Program

A C++ program is compiled against the Acron desktop SDK of your platform: the engine prebuilt, with its headers and a CMake package. You need CMake 3.16 or later and a C++17 compiler: Xcode’s command-line tools on macOS, Visual Studio 2022 on Windows, GCC or Clang (with the X11 and OpenGL development packages) on Linux.

A Minimal Project

Put the program (for example the one in Starting Acron) in main.cxx, and next to it a CMakeLists.txt:

cmake_minimum_required(VERSION 3.16)
project(mygame LANGUAGES CXX)

find_package(Acron REQUIRED COMPONENTS Framework)

add_executable(mygame main.cxx)
target_compile_features(mygame PRIVATE cxx_std_17)
target_link_libraries(mygame PRIVATE Acron::Framework::p3framework)

With acronmanager

In a project that has a pyproject.toml, name the CMake target:

[tool.acron.cmake]
target = "mygame"

and acronmanager run downloads the SDK for your platform (once, with the launcher’s sign-in), configures and builds the project with it, and starts the program. acronmanager build only compiles.

By Hand

With an SDK unpacked in <sdk>:

cmake -S . -B build -DAcron_DIR=<sdk>/lib/cmake/Acron
cmake --build build --config Release
build/mygame

On Windows, put <sdk>\bin on PATH first, where the engine’s DLLs are, and run build\Release\mygame.exe.

Building C++ Games for the Desktop describes the SDK, the other CMake components and shipping the program.