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

Skip FetchContent if relevant targets already exist #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gareth-cross
Copy link
Contributor

  • This change alters the behavior of FindDependencies.cmake such that the PoseLib and colmap repos are not fetched if those targets already exist.
  • This makes it easier to build glomap in a larger project where PoseLib and colmap are already CMake sub-projects.

@lpanaf
Copy link
Collaborator

lpanaf commented Mar 13, 2025

Hi, we add flags in the cmake to disable fetch_content. However, it is not always desired to directly use it because it might have version inconsistency

@gareth-cross
Copy link
Contributor Author

gareth-cross commented Mar 13, 2025

Hi, we add flags in the cmake to disable fetch_content. However, it is not always desired to directly use it because it might have version inconsistency

The goal of this change is to make it so that neither of the following things happens if the target already exists in the CMake project:

  • FetchContent should not run.
  • find_package should not run.

That way, COLMAP and PoseLib can be built at the same time as GLOMAP in one project.

The current flag will disable the first, but then perform the second (which will fail unless that dependency has been installed somewhere cmake can find it).

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.

2 participants