Skip to content

Enhance CMake build system with packaging and multi-platform support - #5083

Merged
Loobinex merged 10 commits into
dkfans:masterfrom
cerwym:feature/cmake
Aug 4, 2026
Merged

Enhance CMake build system with packaging and multi-platform support#5083
Loobinex merged 10 commits into
dkfans:masterfrom
cerwym:feature/cmake

Conversation

@cerwym

@cerwym cerwym commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Asset packaging specifically left out to reduce size

Copilot AI review requested due to automatic review settings August 3, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the project’s CMake build into modular platform/dependency/target/packaging components, updates CI to build via CMake (including cross-compiled MinGW), and adjusts the make-based packaging flow to support a CPack-driven archive step.

Changes:

  • Modularize CMake build logic into build/cmake/modules/* (platform detection, deps download/linking, target definitions, CPack packaging).
  • Update GitHub Actions workflows to build binaries with CMake/Ninja and produce release archives via CPack (using make pkg-assemble only for data staging).
  • Remove legacy build scripts (linux.mk, old deps/CMakeLists.txt) and add a helper script (build-cmake.sh) for local CMake builds.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
package.mk Adds pkg-assemble and data-only staging list for CPack-based packaging.
linux.mk Removes the legacy Linux make-based build script.
deps/CMakeLists.txt Removes the legacy CMake deps-download/link approach under deps/.
CMakeLists.txt Switches to modular CMake includes (Platforms/Dependencies/BuildTargets/Packaging) and cache overrides for build number/suffix.
build/cmake/toolchains/mingw32.cmake Adjusts MinGW toolchain compiler names to non--posix variants.
build/cmake/modules/Platforms.cmake Adds platform detection and platform-scoped compile definitions.
build/cmake/modules/Packaging.cmake Introduces CPack configuration and install rules to package binaries + staged data.
build/cmake/modules/Helpers.cmake Adds shared functions for warnings/link flags/system libs by platform.
build/cmake/modules/Dependencies.cmake Implements per-platform dependency fetching/import/linking (build-dir isolated).
build/cmake/modules/BuildTargets.cmake Defines keeperfx targets, source filtering, and per-target flags/linking.
build-cmake.sh Adds a local build helper (optionally Dockerized) for Windows cross-build and native Linux.
.gitignore Stops ignoring build/ (now tracked for CMake modules); ignores build-* instead.
.github/workflows/build-release-patch-unsigned.yml Moves Windows packaging build to CMake + CPack flow; installs CMake/Ninja.
.github/workflows/build-prototype.yml Moves both Windows and Linux prototype builds to CMake; updates artifact paths and deps.
.github/workflows/build-alpha-patch-unsigned.yml Moves Windows alpha packaging build to CMake + CPack flow; installs CMake/Ninja.
Suppressed comments (1)

build/cmake/modules/Packaging.cmake:18

  • The usage example builds the package target from a build directory, but the configure step uses -B out. The build directory should match.
#   4. Create the archive:
#        cmake --build build --target package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.mk
Comment thread build/cmake/modules/Packaging.cmake
Comment thread build/cmake/modules/Packaging.cmake
Comment thread build/cmake/modules/Packaging.cmake
Comment thread build/cmake/modules/Dependencies.cmake
Comment thread build-cmake.sh
Comment thread CMakeLists.txt
@cerwym cerwym mentioned this pull request Aug 4, 2026
@Loobinex
Loobinex merged commit 9baef07 into dkfans:master Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants