cmake: Fix Android build for r25 NDK

Currently with the build instructions provided in README.md
the build will fail.

In the r25 NDK the CMake toolchain defaults to the legacy path,
due to a bug in the current implementation.

https://github.com/android/ndk/issues/323
This commit is contained in:
Juan Ramos 2023-07-18 11:50:19 -06:00 committed by arcady-lunarg
parent 9afd346127
commit a9a2625416
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ if(WIN32)
include(ChooseMSVCCRT.cmake)
endif()
add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
elseif(UNIX)
elseif(UNIX OR ANDROID)
add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
else()
message("unknown platform")

View File

@ -33,7 +33,7 @@
if(WIN32)
add_subdirectory(OSDependent/Windows)
elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia" OR ANDROID)
add_subdirectory(OSDependent/Unix)
else()
message("unknown platform")