find_path no longer working for android-unity on CMake 3.27
Hello,
Not sure where to ask because I don't know where to start investigating but:
After updating to CMake 3.27 from CMake 3.26, my project no longer builds. After a bit of fighting with my machine, I managed to isolate and reproduce the problem with just this:
project(foo)
set(CMAKE_FIND_DEBUG_MODE TRUE)
find_path(GLES2_INCLUDE_DIR GLES2/gl2.h)
message(FATAL_ERROR "${GLES2_INCLUDE_DIR}")
and invoking with
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE="C:/Program Files/Unity/Hub/Editor/2022.2.11f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/build/cmake/android.toolchain.cmake" -G Ninja ..
CMake 3.27:
CMake Error at CMakeLists.txt:12 (message):
GLES2_INCLUDE_DIR-NOTFOUND
CMake 3.26:
CMake Error at CMakeLists.txt:12 (message):
C:/Program
Files/Unity/Hub/Editor/2022.2.11f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include
Not sure how to provide full logs in a convenient way so here are pastebins:
3.27: https://pastebin.com/CZ20dTZX
3.26: https://pastebin.com/MfFJEaut
Any hints on what I should do / what changed?