diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ms-gdkx/portfile.cmake | |
Diffstat (limited to 'vcpkg/ports/ms-gdkx/portfile.cmake')
| -rw-r--r-- | vcpkg/ports/ms-gdkx/portfile.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vcpkg/ports/ms-gdkx/portfile.cmake b/vcpkg/ports/ms-gdkx/portfile.cmake new file mode 100644 index 0000000..ed80fdc --- /dev/null +++ b/vcpkg/ports/ms-gdkx/portfile.cmake @@ -0,0 +1,30 @@ +cmake_path(SET GRDKLatest "$ENV{GRDKLatest}") + +find_path(GRDK_H + NAMES grdk.h + PATHS "${GRDKLatest}/gameKit/Include" +) + +cmake_path(SET GXDKLatest "$ENV{GXDKLatest}") + +find_path(GXDK_H + NAMES gxdk.h + PATHS "${GXDKLatest}/gameKit/Include" +) + +if(NOT (GRDK_H AND GXDK_H)) + message(FATAL_ERROR "Ensure you have installed the Microsoft GDK with Xbox Extensions installed. See https://aka.ms/gdkx.") +endif() + +# Output user-friendly status message for installed edition. +if(${GXDKLatest} MATCHES ".*/([0-9][0-9])([0-9][0-9])([0-9][0-9])/.*") + set(_months "null" "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December") + list(GET _months ${CMAKE_MATCH_2} month) + set(update "") + if(${CMAKE_MATCH_3} GREATER 0) + set(update " Update ${CMAKE_MATCH_3}") + endif() + message(STATUS "Found the Microsoft GDK with Xbox Extensions (${month} 20${CMAKE_MATCH_1}${update})") +endif() + +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
\ No newline at end of file |