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_modules/FindSqlite3.cmake breaks transitive dependencies. #1250

Open
dg0yt opened this issue Mar 23, 2024 · 2 comments
Open

cmake_modules/FindSqlite3.cmake breaks transitive dependencies. #1250

dg0yt opened this issue Mar 23, 2024 · 2 comments

Comments

@dg0yt
Copy link

dg0yt commented Mar 23, 2024

Since CMake 3.14, there is an official FindSQLite3.cmake, variable prefix SQLite3, and an imported target.
rtabmap comes with FindSqlite3.cmake, variable prefix Sqlite3.
On case-insensitive filesystems (Windows), this can break finding downstream dependencies with find_dependency(SQLite3). This was noticed in vcpkg when updating PROJ, via a rtabmap > opencv > vtk > proj > sqlite3 dependency chain.

CMake Error at C:/a/1/s/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  Found package configuration file:

    D:/installed/x64-windows/share/proj/proj-config.cmake

  but it set PROJ_FOUND to FALSE so package "PROJ" is considered to be NOT
  FOUND.  Reason given by package:

  PROJ could not be found because dependency SQLite3 could not be found.

Call Stack (most recent call first):
  D:/installed/x64-windows/share/vtk/VTK-vtk-module-find-packages.cm	820 (find_package)
  D:/installed/x64-windows/share/vtk/vtk-config.cmake:150 (include)
  C:/a/1/s/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  D:/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  D:/installed/x64-windows/share/opencv/OpenCVModules.cmake:43 (find_dependency)
  D:/installed/x64-windows/share/opencv/OpenCVConfig.cmake:174 (include)
  C:/a/1/s/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  CMakeLists.txt:232 (FIND_PACKAGE)

Possible solutions:

@matlabbe
Copy link
Member

I implemented the second suggestion. You could try this tag 0.21.4.1 on your pull request.

@dg0yt
Copy link
Author

dg0yt commented Mar 28, 2024

I didn't update my PR which discovered the problem, but I'm building successfully with 0.21.4.1 in a more general review of the vcpkg port, microsoft/vcpkg#37651.

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

No branches or pull requests

2 participants