Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion App/Build-App.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ project "App"
defines { "DIST" }
runtime "Release"
optimize "On"
symbols "Off"
symbols "Off"
8 changes: 6 additions & 2 deletions Build.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
-- premake5.lua
workspace "New Project"
architecture "x64"
if os.host() == "macosx" then
architecture "ARM64"
else
architecture "x64"
end
configurations { "Debug", "Release", "Dist" }
startproject "App"

Expand All @@ -14,4 +18,4 @@ group "Core"
include "Core/Build-Core.lua"
group ""

include "App/Build-App.lua"
include "App/Build-App.lua"
2 changes: 1 addition & 1 deletion Core/Build-Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ project "Core"
defines { "DIST" }
runtime "Release"
optimize "On"
symbols "Off"
symbols "Off"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ The `Scripts/` directory contains build scripts for Windows and Linux, and the `
1. Clone this repository or use the "Use this template" button on GitHub to quickly set up your own repository based on this template
2. `App/` and `Core/` are the two projects - you can edit the names of these folders and their contents to suit
3. The three included Premake build files are `Build.lua`, `Core/Build-Core.lua` and `App/Build-App.lua` - you can edit these to customise your build configurations, edit the names of your projects and workspace/solution, etc.
4. Open the `Scripts/` directory and run the appropriate `Setup` script to generate projects files. You can edit the setup scripts to change the type of project that is generated - out of the box they are set to Visual Studio 2022 for Windows and gmake2 for Linux.
4. Open the `Scripts/` directory and run the appropriate `Setup` script to generate projects files. You can edit the setup scripts to change the type of project that is generated - out of the box they are set to Visual Studio 2022 for Windows, gmake2 for Linux, and Xcode for macOS.

Note that no macOS setup script is currently provided; you can duplicate the Linux script and adjust accordingly.
`Setup-macOS.sh` will generate an Xcode project targeting Apple silicon.

## Included
- Some example code (in `App/Source` and `Core/Source`) to provide a starting point and test
Expand Down
8 changes: 8 additions & 0 deletions Scripts/Setup-macOS.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$SCRIPT_DIR/.."

pushd "$ROOT_DIR"
"$ROOT_DIR/Vendor/Binaries/Premake/macOS/premake5" --cc=clang --file=Build.lua xcode4
popd