FindGDAL outputs the wrong case library name (MacOS)
When running FindGDAL the wrong GDAL_LIBRARY is produced. This affects both the 3.14 then previous versions too.
Version: 2.4.1 Headers: /Library/Frameworks/GDAL.framework/Headers Library: /Library/Frameworks/gdal.framework
the correct path should be
happycactus:TestGdalBugMacOS HappyCactus$ ls -ld /Library/Frameworks/[Gg][Dd]* drwxrwxr-x 8 root admin 256 Jun 13 11:06 /Library/Frameworks/GDAL.framework
For this reason, even a simple project can't link:
[ 50%] Linking CXX executable TestGdalBugMacOS "/Users/happycactus/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/191.7479.33/CLion.app/Contents/bin/cmake/mac/bin/cmake" -E cmake_link_script CMakeFiles/TestGdalBugMacOS.dir/link.txt --verbose=1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/TestGdalBugMacOS.dir/main.cpp.o -o TestGdalBugMacOS /Library/Frameworks/gdal.framework ld: can't map file, errno=22 file '/Library/Frameworks/gdal.framework' for architecture x86_64
This was tested with 3.14 (to support Imported targets) but it affects also 3.13 and 3.12 (though I'm unsure of the version). MACOS ONLY. It works fine on Linux.