Skip to content

Conversation

@MathewBensonCode
Copy link
Contributor

@MathewBensonCode MathewBensonCode commented Sep 4, 2025

  • Change the Powershell BuildEngine.ps1 script to use the Cmake Preset Commands
  • Move the CMake Configuration to the CMakePreset.json file
  • Harmonize the Build Configurations and multiple Architecture support by adding an Architecture Parameter the the BuildEngine.ps1 and RunTests.ps1 scripts
  • Update CI workflows and CMakeFiles to better support the Configurations and Architectures.
  • Vulkan-Loader no longer compiled in the BuildEngine.ps1 script and is now part of the CMake add_subdirectory workflow which brings consistency. This is done using the VULKAN_HEADERS_ENABLE_INSTALL=ON CMakeVariable which avails the VulkanHeadersConfig.cmake file to the Vulkan-Loader, hence removing the need for setting the CMakePrefix and/or pre-compiling the Vulkan-Loader in the BuildEngine.ps1.
  • Removal of unnecessary CMake target_include_directory calls in externals.cmake and imgui/CMakeLists.txt as each target communicates its includes through the target_link_libraries() command.

Resolves #76

jobs:
deploy:
name: deploy-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
runs-on: ${{ inputs.architecture == 'x64' && 'macos-13' || 'macos-latest' }}

Choose a reason for hiding this comment

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

you want to revert the arch, otherwise it will default to macos-13

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted. So in the case of x64 we want macos-13 but for arm64 it selects macos-latest

Copy link
Owner

@JeanPhilippeKernel JeanPhilippeKernel Sep 11, 2025

Choose a reason for hiding this comment

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

correct on the x64 and macos-13

macos-latest is missing NuGet program so we can't use it for Build Stage since Panzerfaust needs it to restore its packages. On test and deploy stages it's okay to use it but I'd prefer that we use macos-14 instead, so we can be consistent across all pipeline files.

@MathewBensonCode MathewBensonCode marked this pull request as draft September 11, 2025 16:18
Comment on lines 182 to 183
if($LauncherOnly) {
$cMakeCacheVariableOverride += ' ' + $submoduleCMakeOptions.LAUNCHER_ONLY -join ' '

Choose a reason for hiding this comment

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

dropping this means you are breaking the Dev Exp to build only the Panzerfaust and not the engine.

Contexts:
Some contributors are only interested to work on the Panzerfaust project, and this option is for them to only build it and never build the engine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted. Will see how to work this out

"inherits": "BaseOptions",
"displayName": "Darwin XCode Debug",
"binaryDir": "Result.Darwin.x64.Debug",
"generator": "Xcode",

Choose a reason for hiding this comment

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

architecture missing ?

{
"name": "Darwin_arm64_Debug",
"inherits": "Darwin_x64_Debug",
"binaryDir": "Result.Darwin.arm64.Debug",

Choose a reason for hiding this comment

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

architecture missing ?

@MathewBensonCode MathewBensonCode marked this pull request as ready for review September 11, 2025 23:51
 - Change the Powershell BuildEngine.ps1 script to use the Cmake Preset
   Commands
 - Move the CMake Configuration to the CMakePreset.json file
 - Harmonize the Build Configurations and multiple Architecture support
   by adding an Architecture Parameter the the BuildEngine.ps1 and RunTests.ps1
   scripts
 - Update CI workflows and CMakeFiles to better support the
   Configurations and Architectures.
 - Vulkan-Loader no longer compiled in the BuildEngine.ps1 script and is
   now part of the CMake add_subdirectory workflow which brings
   consistency.
 - Removal of unnecessary CMake `target_include_directory` calls in
   `externals.cmake` and `imgui/CMakeLists.txt` as each target communicates its includes through the
   `target_link_libraries()` command.
@JeanPhilippeKernel
Copy link
Owner

Thanks a lot @MathewBensonCode for this beautiful PR ❤️🎉🎉

@JeanPhilippeKernel JeanPhilippeKernel merged commit 54ed55d into JeanPhilippeKernel:develop Sep 13, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in ZEngine Board Sep 13, 2025
@MathewBensonCode MathewBensonCode deleted the CMakePresets branch September 13, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-linux Work on Linux system area-macOS Work on macOS system area-window Work on Window system DevOps enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add support of CmakePreset

3 participants