find_package() stops working when CMAKE_SYSTEM_NAME=iOS

I’m sorry, I should have written an MCVE from the beginning.
Here it is: GitHub - bblanchon/cmake-findpackage-ios-bug

You’ll see that it boils down to the three following files:

# CMakeLists.txt
find_package(ThePackage REQUIRED)
# ThePackage/ThePackageConfig.cmake
message("It works!!!")
# build.sh
export ThePackage_DIR="$(dirname $0)/ThePackage"
cmake -D CMAKE_SYSTEM_NAME="iOS" .