Skip to content

[gdal] Fix with current CMake.#51410

Merged
BillyONeal merged 3 commits into
microsoft:masterfrom
BillyONeal:fix-gdal-cmake
Apr 30, 2026
Merged

[gdal] Fix with current CMake.#51410
BillyONeal merged 3 commits into
microsoft:masterfrom
BillyONeal:fix-gdal-cmake

Conversation

@BillyONeal

@BillyONeal BillyONeal commented Apr 27, 2026

Copy link
Copy Markdown
Member

Remove fix-gdal-target-interfaces because it was applied upstream in OSGeo/gdal@f63b63e (by @dg0yt )

Regenerate patches. If the only diff was "SHA-ish" I reverted it but if there were line number changes I took it.

Make gdal's FindSQLite module it hijacks the world with create the CMake 4.3+ SQLite3::SQLite3 target in addition to the SQLite::SQLite3 one.

This fixes the gz-common failures in #51210

Remove fix-gdal-target-interfaces because it was applied upstream in OSGeo/gdal@f63b63e

Regenerate patches.

Don't install FindSQLite3.cmake which breaks all SQLite customers expecting to use SQLite3::SQLite3. (I tried to apply OSGeo/gdal@1eb29fb but it does not apply cleanly, and it seems wrong to be replacing a built in find module like this for unrelated customers anyway)
@BillyONeal BillyONeal marked this pull request as draft April 28, 2026 00:47
@BillyONeal

Copy link
Copy Markdown
Member Author

I was hoping to get away with just yanking this but it looks like it broke things in the opposite direction for arm-neon-android, so I guess I need to patch their override to create the correct targets.

IMO it is unacceptable that we ever let GDAL do this but too late to go back now.

@BillyONeal BillyONeal closed this Apr 28, 2026
@BillyONeal BillyONeal reopened this Apr 28, 2026
@dg0yt

dg0yt commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The vendored FindSQLite3.cmake has been troublesome before. That's why it wasn't removed by the port.

@dg0yt

dg0yt commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

IIUC the update patch files are unchanged except for line numbers.

@dg0yt

dg0yt commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

What GDAL needs for SQLite3 in CMake 4.3 is adapting to the new imported target created Kitware's FindSQLite3.cmake.

@BillyONeal

Copy link
Copy Markdown
Member Author

The vendored FindSQLite3.cmake has been troublesome before. That's why it wasn't removed by the port.

It passed my initial test on Windows.

IIUC the update patch files are unchanged except for line numbers.

I took the ones where line numbers changed but not where only SHAs changed. Sometimes a closer line number is helpful in future updates when the patch doesn't apply cleanly.

What GDAL needs for SQLite3 in CMake 4.3 is adapting to the new imported target created Kitware's FindSQLite3.cmake.

Yeah, and I think there's already an upstream commit for it. I wanted to try removing it first but I guess I can't :(.

@dg0yt

dg0yt commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The vendored FindSQLite3.cmake has been troublesome before. That's why it wasn't removed by the port.

It passed my initial test on Windows.

Using default linkage? On Windows, it hides the pain of transitive dependencies. I started vcpkg with months of fixing #9068.

@BillyONeal

Copy link
Copy Markdown
Member Author

Using default linkage? On Windows, it hides the pain of transitive dependencies. I started vcpkg with months of fixing #9068.

I mean, it seemed like it.

@BillyONeal BillyONeal marked this pull request as ready for review April 30, 2026 01:29
@azure-pipelines

Copy link
Copy Markdown
There was an error handling pipeline event 2d95fb5c-3814-4825-9aae-82fb3df0e28e.

@BillyONeal

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal BillyONeal merged commit 4c5d418 into microsoft:master Apr 30, 2026
16 checks passed
@BillyONeal BillyONeal deleted the fix-gdal-cmake branch April 30, 2026 19:10
@BillyONeal BillyONeal mentioned this pull request May 5, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants