-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add _qt_internal_detect_latest_android_platform
Function generalize the detecting of the latest available Android platform in the ANDROID_SDK_ROOT directory. Change-Id: Ib1d064428c414625f24765b50cff500a0ad5d27e Reviewed-by: Alexandru Croitor <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (C) 2024 The Qt Company Ltd. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
function(_qt_internal_detect_latest_android_platform out_var) | ||
# Locate the highest available platform | ||
file(GLOB android_platforms | ||
LIST_DIRECTORIES true | ||
RELATIVE "${ANDROID_SDK_ROOT}/platforms" | ||
"${ANDROID_SDK_ROOT}/platforms/*") | ||
|
||
# If list is not empty | ||
if(android_platforms) | ||
qt_internal_sort_android_platforms(android_platforms ${android_platforms}) | ||
list(REVERSE android_platforms) | ||
list(GET android_platforms 0 android_platform_latest) | ||
set(${out_var} "${android_platform_latest}" PARENT_SCOPE) | ||
else() | ||
set(${out_var} "${out_var}-NOTFOUND" PARENT_SCOPE) | ||
endif() | ||
endfunction() |