Enhance CMake build system with packaging and multi-platform support - #5083
Merged
Conversation
…peline stays make)
…inux as desktop platform; remove linux.mk
There was a problem hiding this comment.
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-assembleonly for data staging). - Remove legacy build scripts (
linux.mk, olddeps/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
packagetarget from abuilddirectory, 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.
Merged
PieterVdc
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Asset packaging specifically left out to reduce size