-
-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto detect latest GDK and Windows SDK (#1124)
* Auto detect latest GDK and Windows SDK * Update changelog * Accept Suggestions and allow GDK override --------- Co-authored-by: PlasmaDev5 <dragpmCASTjosh@gmail.com> Co-authored-by: Mischan Toosarani-Hausberger <mischan@abovevacant.com>
- Loading branch information
1 parent
2aa4b16
commit 1fc2c77
Showing
8 changed files
with
55 additions
and
53 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
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 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,10 @@ | ||
get_filename_component(GDK_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\GDK;InstallPath]" ABSOLUTE CACHE) | ||
|
||
if(NOT GDK_VERSION) | ||
FILE(GLOB subfolders RELATIVE "${GDK_DIR}" "${GDK_DIR}/*") | ||
list(FILTER subfolders INCLUDE REGEX "[0-9]+") | ||
list(SORT subfolders COMPARE NATURAL) # sort by version number | ||
list(GET subfolders -1 GDK_VERSION) # GET -1 is last element, i.e. highest version | ||
endif() | ||
|
||
message(STATUS "Using GDK version ${GDK_VERSION} at ${GDK_DIR}") |
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,9 @@ | ||
get_filename_component(WINDOWS_SDK "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE CACHE) | ||
|
||
if(NOT WINDOWS_SDK_VER) | ||
file(GLOB subfolders RELATIVE "${WINDOWS_SDK}/Lib" "${WINDOWS_SDK}/Lib/*") | ||
list(SORT subfolders COMPARE NATURAL) # sort by version number | ||
list(GET subfolders -1 WINDOWS_SDK_VER) # GET -1 is last element, i.e. highest version | ||
endif () | ||
|
||
message(STATUS "Using Windows SDK version ${WINDOWS_SDK_VER} at ${WINDOWS_SDK}") |
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 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