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

CMake: Replace custom FindSqlite3 with FindSQLite3 built-in #4007

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

mwtoews
Copy link
Member

@mwtoews mwtoews commented Jan 17, 2024

This PR replaces the custom FindSqlite3 module with the FindSQLite3 built-in.

Upon further inspection, the variables SQLITE3_INCLUDE_DIR and SQLITE3_LIBRARY cannot be easily mapped to modern variables, so these variables are removed. Users are encouraged to use CMAKE_PREFIX_PATH instead, which is added to the install docs.

Closes #4004

@mwtoews mwtoews added this to the 9.4.0 milestone Jan 17, 2024
@mwtoews
Copy link
Member Author

mwtoews commented Jan 17, 2024

Ah, thanks for pointer. I can map these, and provide a deprecation message. I'd like to still remove these from the docs, as these are advanced variables that aren't even in the CMake docs.

@mwtoews mwtoews force-pushed the cmake-sqlite3-built-in branch 2 times, most recently from 94fa5f0 to de45640 Compare January 17, 2024 22:53
@mwtoews
Copy link
Member Author

mwtoews commented Jan 17, 2024

A small deprecation notice is added to docs here:
Screenshot from 2024-01-18 11-51-45

although I might be misusing the deprecated:: directive, so the formatting looks a bit off. It is normally indented under an option.

For consistency, we may want to also undocument CURL_ and TIFF_ variables for LIBRARY and INCLUDE_DIR too, as these should ideally be handled by CMAKE_PREFIX_PATH. I'm also fine to put back SQLITE3_INCLUDE_DIR and SQLITE3_LIBRARY docs with their deprecated:: too, if that's preferred.

@rouault rouault merged commit f377ffa into OSGeo:master Jan 18, 2024
22 checks passed
@mwtoews mwtoews deleted the cmake-sqlite3-built-in branch January 18, 2024 16:47
Comment on lines +182 to +186
set(SQLite3_INCLUDE_DIR ${SQLITE3_INCLUDE_DIR})
endif()
if(DEFINED SQLITE3_LIBRARY)
message(DEPRECATION "Use SQLite3_LIBRARY instead of SQLITE3_LIBRARY")
set(SQLite3_LIBRARY ${SQLITE3_LIBRARY})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR the target variables are (meant to be) cache variables. But it probably works as is.

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.

Clean up sqlite3 further in CMake
3 participants