Skip to content
Merged
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
11 changes: 9 additions & 2 deletions ports/ms-gdkx/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# April 2025 or earlier
cmake_path(SET GRDKLatest "$ENV{GRDKLatest}")
cmake_path(SET GXDKLatest "$ENV{GXDKLatest}")

# October 2025 or later
cmake_path(SET GameDKCoreLatest "$ENV{GameDKCoreLatest}")
cmake_path(SET GameDKXboxLatest "$ENV{GameDKXboxLatest}")

find_path(GRDK_H
NAMES grdk.h
PATHS "${GRDKLatest}/gameKit/Include"
"${GameDKXboxLatest}/windows/include"
"${GameDKCoreLatest}/windows/include"
)

cmake_path(SET GXDKLatest "$ENV{GXDKLatest}")

find_path(GXDK_H
NAMES gxdk.h
PATHS "${GXDKLatest}/gameKit/Include"
"${GameDKXboxLatest}/xbox/include"
)

if(NOT (GRDK_H AND GXDK_H))
Expand Down
2 changes: 1 addition & 1 deletion ports/ms-gdkx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ms-gdkx",
"version": "1.0.0",
"port-version": 1,
"port-version": 2,
"description": "Stub port that ensures the Microsoft GDK with Xbox Extensions is installed.",
"homepage": "https://aka.ms/gdkx",
"documentation": "https://aka.ms/gamedevdocs",
Expand Down
6 changes: 6 additions & 0 deletions scripts/ci.feature.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2035,3 +2035,9 @@ osg:x64-osx=skip
osg-qt:x64-osx=skip # due to dependency on osg
osgearth:x64-osx=skip # due to dependency on osg
sdformat:x64-osx=skip # due to dependency on gz-*

# ms-gdkx require the Microsoft GDK with Xbox Extensions which is not installed on the CI pipeline machines
ms-gdkx:x64-windows-release=skip
ms-gdkx:x64-windows-static-md=skip
ms-gdkx:x64-windows-static=skip
ms-gdkx:x64-windows=skip
28 changes: 26 additions & 2 deletions scripts/toolchains/xbox.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
set(CMAKE_CROSSCOMPILING ON CACHE STRING "")

# Add the Microsoft GDK if present
if (DEFINED ENV{GRDKLatest})
if (DEFINED ENV{GameDKCoreLatest})
# October 2025 or later
# No windows paths should be used for console targets.
elseif (DEFINED ENV{GRDKLatest})
# April 2025 or earlier
cmake_path(SET _vcpkg_grdk "$ENV{GRDKLatest}")

list(APPEND CMAKE_REQUIRED_INCLUDES "${_vcpkg_grdk}/gameKit/Include")
Expand All @@ -53,7 +57,27 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
endif()

# Add the Microsoft GDK Xbox Extensions if present
if (DEFINED ENV{GXDKLatest})
if (DEFINED ENV{GameDKXboxLatest})
# October 2025 or later
cmake_path(SET _vcpkg_gxdk "$ENV{GameDKXboxLatest}")

if(XBOX_CONSOLE_TARGET STREQUAL "scarlett")
list(APPEND CMAKE_REQUIRED_INCLUDES "${_vcpkg_gxdk}/xbox/include/gen9" "${_vcpkg_gxdk}/xbox/include")
include_directories(BEFORE SYSTEM "${_vcpkg_gxdk}/xbox/include/gen9" "${_vcpkg_gxdk}/xbox/include")
cmake_path(CONVERT "${_vcpkg_gxdk}/xbox/include/gen9;${_vcpkg_gxdk}/xbox/include" TO_NATIVE_PATH_LIST _vcpkg_inc NORMALIZE)

link_directories(BEFORE "${_vcpkg_gxdk}/xbox/lib/gen9" "${_vcpkg_gxdk}/xbox/lib/x64")
cmake_path(CONVERT "${_vcpkg_gxdk}/xbox/lib/gen9;${_vcpkg_gxdk}/xbox/lib/x64" TO_NATIVE_PATH_LIST _vcpkg_lib NORMALIZE)
elseif(XBOX_CONSOLE_TARGET STREQUAL "xboxone")
list(APPEND CMAKE_REQUIRED_INCLUDES "${_vcpkg_gxdk}/xbox/include/gen8" "${_vcpkg_gxdk}/xbox/include")
include_directories(BEFORE SYSTEM "${_vcpkg_gxdk}/xbox/include/gen8" "${_vcpkg_gxdk}/xbox/include")
cmake_path(CONVERT "${_vcpkg_gxdk}/xbox/include/gen8;${_vcpkg_gxdk}/xbox/include" TO_NATIVE_PATH_LIST _vcpkg_inc NORMALIZE)

link_directories(BEFORE "${_vcpkg_gxdk}/xbox/lib/gen8" "${_vcpkg_gxdk}/xbox/lib/x64")
cmake_path(CONVERT "${_vcpkg_gxdk}/xbox/lib/gen8;${_vcpkg_gxdk}/xbox/lib/x64" TO_NATIVE_PATH_LIST _vcpkg_lib NORMALIZE)
endif()
elseif (DEFINED ENV{GXDKLatest})
# April 2025 or earlier
cmake_path(SET _vcpkg_gxdk "$ENV{GXDKLatest}")

if(XBOX_CONSOLE_TARGET STREQUAL "scarlett")
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6566,7 +6566,7 @@
},
"ms-gdkx": {
"baseline": "1.0.0",
"port-version": 1
"port-version": 2
},
"ms-gltf": {
"baseline": "2024-09-05",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/ms-gdkx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "30527c5a57b01164f08c5ca66ff5d3124b1d8e63",
"version": "1.0.0",
"port-version": 2
},
{
"git-tree": "88dfc0932dd418a9099759f87a60dab8a0df8d6e",
"version": "1.0.0",
Expand Down