Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to explicit SQLite3 target #3987

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

ErixenCruz
Copy link
Contributor

@ErixenCruz ErixenCruz commented Jan 5, 2024

  • Added clear title that can be used to generate release notes

This change originates from Conan conan-io/conan-center-index#21512 (comment).

I create an explicit SQLite::SQLite3 target library and then add that target. The target has the include directory property set inside it, so we no longer have to do a target_include_directories. This makes it easier for package managers to control the SQLite3 dependency, and it aligns with more recent Cmake version sqlite3 usage.

Both vcpkg and conan are forced to patch the PROJ CMakeLists.txt so that they can inject their own Sqlite3 right now, but if we can instead link a SQLite::SQLite3 target, package managers can just make sure that that target is defined before trying to build PROJ.

Another alternative is requiring a more recent Cmake version and using built-in FindSQLite3. I think that may be a more involved change though.

@ErixenCruz
Copy link
Contributor Author

ErixenCruz commented Jan 5, 2024

I believe this is failing because we need to indicate to consumers of the library that they need to find SQLite3 the same way that we do for TIFF and CURL. The c_app build test does not find it on its own. I think this is kind of tricky because that means we need to pass "FindSqlite3.cmake" in the variable CMAKE_MODULE_PATH. its not reasonable for people integrating PROJ with cmake to have to copy in FindSqlite3. I think it works as it is now because c_app uses whatever sqlite that PROJ found when it was installed. This is the crux of the problem when a package manager wants to control the sqlite that PROJ uses.

so im leaning towards requiring Cmake version 3.14 so that we can just use built-in FindSQLite3. ubuntu 20.04 LTS ships 3.16, so I think 3.14 isn't crazy. Bumping Cmake version requires PSC approval (RFC3).

Is this something thats possible?

@rouault rouault merged commit 8cfeba7 into OSGeo:master Jan 15, 2024
22 checks passed
dg0yt added a commit to dg0yt/PROJ that referenced this pull request Jan 16, 2024
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.

None yet

2 participants