Skip to content

Commit

Permalink
cmake: Fix Android build for r25 NDK
Browse files Browse the repository at this point in the history
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.

android/ndk#323
  • Loading branch information
juan-lunarg authored and arcady-lunarg committed Jul 18, 2023
1 parent 9afd346 commit a9a2625
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion glslang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a9a2625

Please sign in to comment.