Thanks for all the replies so far. I'm aim to work through them properly when I get time and expect to have some follow-up questions.

For now, I just wanted to briefly address this comment:


You can still build with Autotools!


For GDAL 3.5.x, this is true. However, it is GDAL 3.6 (not yet released) that has the new features that I really need. And on GDAL GitHub, it states:

RFC 84:
Addition of a CMake build system, which deprecates the existing
autoconf/automake and nmake build systems, that will be removed
in GDAL 3.6.0. Users are encouraged to adopt the new CMake build system.
Documentation of the CMake build system is at
https://gdal.org/build_hints.html.

Therefore the purpose of this exercise is to get the CMake system working. So if my understanding is correct, avoiding CMake is not an option for me if I want to use GDAL 3.6.

Cheers,
Nik.

-----------------------------------------

NIK SANDS
Line Tamer | Time Traveller | Space Cadet

On 2022-06-28 20:14, Mateusz Loskot wrote:
On Tue, 28 Jun 2022 at 03:28, Nik Sands <n...@nixanz.com> wrote:
However, I’m getting numerous build errors, starting with the following error when running cmake to build GDAL 3.5.0:

        fatal error: 'direct.h' file not found

Check cmake command output for

-- Looking for direct.h

and what is the look-up result it reports.

GDAL's CMake configuration checks for direct.h
https://github.com/OSGeo/gdal/blob/14be6dea87fd44dc58c3e6a2befb5913147ddbc7/cmake/helpers/configure.cmake#L38

I’m a hobbyist and not a professional developer, so my understanding of these things is quite limited.

You can still build with Autotools!

However, my research so far indicates that ‘direct.h’ is a Windows-specific header file

Correct.

and therefore perhaps cmake has not been configured correctly for macOS in this GDAL distribution?

As per the earlier link, it's simple, it runs
`check_include_file("direct.h" HAVE_DIRECT_H)`
and if the header is found, then HAVE_DIRECT_H is set.
The CMake configuration does almost the same as the Autotools does:
https://github.com/OSGeo/gdal/blob/14be6dea87fd44dc58c3e6a2befb5913147ddbc7/configure.ac#L295

Question is, is HAVE_DIRECT_H set on macOS or not.

Best regards,
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to