Skip to content

Commit

Permalink
adds GDK Xbox One, Scarlett and Desktop configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
cigumo committed Nov 22, 2022
1 parent aed1086 commit f81e1cd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/bx/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
#endif // BX_CPU_PPC

// http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems
#if defined(_DURANGO) || defined(_XBOX_ONE)
#if defined (_DURANGO) || defined(_XBOX_ONE) || defined(_GAMING_XBOX)
# undef BX_PLATFORM_XBOXONE
# define BX_PLATFORM_XBOXONE 1
#elif defined(_WIN32) || defined(_WIN64)
Expand Down
24 changes: 23 additions & 1 deletion scripts/toolchain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function toolchain(_buildDir, _libDir)
{ "winstore100", "Universal Windows App 10.0" },
{ "durango", "Durango" },
{ "orbis", "Orbis" },
{ "gdk", "GDK Desktop/Xbox" },
},
}

Expand Down Expand Up @@ -418,6 +419,11 @@ function toolchain(_buildDir, _libDir)
premake.vstudio.storeapp = "durango"
platforms { "Durango" }
location (path.join(_buildDir, "projects", _ACTION .. "-durango"))

elseif "gdk" == _OPTIONS["vs"] then
platforms { "gdk-desktop", "gdk-xboxone", "gdk-scarlett" }
location (path.join(_buildDir, "projects", _ACTION .. "-gdk"))

elseif "orbis" == _OPTIONS["vs"] then

if not os.getenv("SCE_ORBIS_SDK_DIR") then
Expand Down Expand Up @@ -506,7 +512,7 @@ function toolchain(_buildDir, _libDir)
"EnableSSE2",
}

configuration { "vs*", "not orbis", "not NX32", "not NX64" }
configuration { "vs*", "not orbis", "not NX32", "not NX64"}
includedirs { path.join(bxDir, "include/compat/msvc") }
defines {
"WIN32",
Expand Down Expand Up @@ -901,6 +907,22 @@ function toolchain(_buildDir, _libDir)
"NOMINMAX",
}

configuration { "gdk"}
targetdir (path.join(_buildDir, "gdk/bin/$(Platform)/$(Configuration)"))
objdir (path.join(_buildDir, "gdk/obj/$(Platform)/$(Configuration)"))
defines {
"_WIN64",
"NOMINMAX",
"UNICODE",
"_UNICODE",
}
removeflags { "StaticRuntime" }

configuration { "gdk", "gdk-xboxone or gdk-scarlett"}
buildoptions {
"/favor:AMD64",
}

configuration { "netbsd" }
targetdir (path.join(_buildDir, "netbsd/bin"))
objdir (path.join(_buildDir, "netbsd/obj"))
Expand Down

0 comments on commit f81e1cd

Please sign in to comment.