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

[PROJ] PROJ should find unofficial-sqlite3 instead of SQlite3 for better multiconfig support #41583

Closed
dbs4261 opened this issue Oct 15, 2024 · 1 comment · Fixed by #41566
Closed
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@dbs4261
Copy link

dbs4261 commented Oct 15, 2024

Is your feature request related to a problem? Please describe.

I am working on a super build for a project that depends on PROJ. I've been struggling to debug a LNK4098 warning reporting that my application, which I am building in release mode, is linking with something that was built in debug mode. I have eventually tracked this issue down to PROJ. When running CMake with CMAKE_FIND_DEBUG_MODE, I realized that when PROJ is installed with VCPKG the resulting proj-config.cmake script calls find_dependency(SQLite3), this then gets picked up by cmake-3.29/Modules/FindSQLite3.cmake. That's a problem because the default FindSQLite3 module searches with a find_library command and the debug and release versions of the library share the same name.

Proposed solution

A patch should be added to change the find_package call of SQLite3 to unofficial-sqlite3 and update the corresponding imported targets.

Describe alternatives you've considered

Another option would be to set CMAKE_FIND_PACKAGE_PREFER_CONFIG, but this can't be done on a package by package basis.

Additional context

No response

@dbs4261 dbs4261 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Oct 15, 2024
@Cheney-W Cheney-W self-assigned this Oct 16, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Oct 17, 2024

I removed the usage of unofficial-sqlite3 in #37650 because I believed the multi-config usage was covered by SQLite::SQLite3. I can confirm now that this is not the case. The best fix would be fixed by a vcpkg cmake wrapper for SQLite3. But as an immediate fix to this issue, #41566 now restores the workaround in port proj.

@Cheney-W Cheney-W added category:port-bug The issue is with a library, which is something the port should already support and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants