[PROJ] PROJ should find unofficial-sqlite3 instead of SQlite3 for better multiconfig support #41583
Labels
category:port-bug
The issue is with a library, which is something the port should already support
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 callsfind_dependency(SQLite3)
, this then gets picked up bycmake-3.29/Modules/FindSQLite3.cmake
. That's a problem because the default FindSQLite3 module searches with afind_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
The text was updated successfully, but these errors were encountered: