From a9a262541601fd08cc30a9a449dc7fba82303980 Mon Sep 17 00:00:00 2001 From: Juan Ramos Date: Tue, 18 Jul 2023 11:50:19 -0600 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- glslang/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89ecf64cb9..d6613bf35b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 317eee77ae..f9ba5ebcbb 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -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")