forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to premake for project generation.
- Loading branch information
1 parent
5d2cd20
commit 5c1dfa0
Showing
8 changed files
with
135 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,14 @@ jobs: | |
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Setup Xmake | ||
uses: xmake-io/github-action-setup-xmake@v1 | ||
- name: Add msbuild to PATH | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
|
||
- name: Setup Premake5 | ||
uses: abel0b/[email protected] | ||
with: | ||
xmake-version: latest | ||
version: "5.0.0-beta2" | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
|
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@echo off | ||
xmake project -m "Release,Debug" -k vsxmake | ||
premake5 vs2022 | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
-- MonoGame - Copyright (C) MonoGame Foundation, Inc | ||
-- This file is subject to the terms and conditions defined in | ||
-- file 'LICENSE.txt', which is part of this source code package. | ||
|
||
function common(project_name) | ||
|
||
platform_target_path = "../../Artifacts/monogame.native/%{cfg.system}/" .. project_name .. "/%{cfg.buildcfg}" | ||
|
||
kind "SharedLib" | ||
language "C++" | ||
architecture "x64" | ||
defines { "DLL_EXPORT" } | ||
targetdir( platform_target_path ) | ||
targetname "monogame.native" | ||
|
||
files | ||
{ | ||
"include/**.h", | ||
"common/**.h", | ||
"common/**.cpp", | ||
} | ||
includedirs | ||
{ | ||
"include", | ||
} | ||
|
||
end | ||
|
||
-- SDL is supported on all desktop platforms. | ||
function sdl2() | ||
|
||
defines { "MG_SDL2" } | ||
|
||
files | ||
{ | ||
"sdl/**.h", | ||
"sdl/**.cpp", | ||
} | ||
|
||
includedirs | ||
{ | ||
"external/sdl2/sdl/include", | ||
} | ||
|
||
filter { "system:windows" } | ||
links | ||
{ | ||
"external/sdl2/sdl/build/Release/SDL2-static.lib", | ||
"winmm", | ||
"imm32", | ||
"user32", | ||
"gdi32", | ||
"advapi32", | ||
"setupapi", | ||
"ole32", | ||
"oleaut32", | ||
"version", | ||
"shell32" | ||
} | ||
|
||
end | ||
|
||
-- Vulkan is supported for all desktop platforms. | ||
function vulkan() | ||
|
||
defines { "MG_VULKAN" } | ||
|
||
files | ||
{ | ||
"vulkan/**.h", | ||
"vulkan/**.cpp", | ||
} | ||
|
||
filter "system:windows" | ||
files { "vulkan/**.rc", } | ||
|
||
includedirs | ||
{ | ||
"external/vulkan-headers/include", | ||
"external/volk", | ||
"external/vma/include", | ||
} | ||
|
||
end | ||
|
||
function configs() | ||
|
||
filter "configurations:Debug" | ||
defines { "DEBUG" } | ||
symbols "On" | ||
|
||
filter "configurations:Release" | ||
defines { "NDEBUG" } | ||
optimize "On" | ||
|
||
end | ||
|
||
workspace "monogame" | ||
configurations { "Debug", "Release" } | ||
|
||
project "desktopvk" | ||
common("desktopvk") | ||
sdl2() | ||
vulkan() | ||
configs() | ||
|
||
|
||
project "windowsdx" | ||
common("windowsdx") |
This file contains 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
This file was deleted.
Oops, something went wrong.