Skip to content

Fix GDAL use in CMake#2480

Merged
dg0yt merged 3 commits intoOpenOrienteering:masterfrom
dg0yt:cmake
Feb 20, 2026
Merged

Fix GDAL use in CMake#2480
dg0yt merged 3 commits intoOpenOrienteering:masterfrom
dg0yt:cmake

Conversation

@dg0yt
Copy link
Member

@dg0yt dg0yt commented Feb 19, 2026

Amends 43b9abe.

This PR revises the use of the find module which comes with CMake.

  • Removing the GDAL version (2!) seems to have altered find_package behavior, breaking OBS builds by not providing necessary include dir. On success, the find module should always set cache and result variables, so this problem might be related to the config package provided since GDAL 3.5.
  • Config package and new versions of the find module provide GDAL::GDAL. But adopting this would need more work for our packaging on Windows, macOS, Android. Out of scope for this PR.
  • Since CMake 3.14, the find module is documented to provide result variables which are CMake lists. This is used now.

@dg0yt dg0yt merged commit 4fb3aee into OpenOrienteering:master Feb 20, 2026
9 checks passed
@dg0yt dg0yt deleted the cmake branch February 20, 2026 04:52
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.

1 participant

Comments