Skip to content

FetchContent usage requires CCR_FETCH_DEPS to resolve dependencies (not documented) #326

Description

@yosuke-lab

Hi,

I tried to use this project via FetchContent as described in the README, but encountered link errors due to missing external dependencies.
(I'm using ubuntu:24.04 docker container)
Specifically, when using FetchContent with default options, the build fails with errors like cannot find -lbase64 .

It appears that these dependencies (e.g., base64 and gherkin) are only added when the CMake option CCR_FETCH_DEPS is enabled.

Without this option, the corresponding targets are not defined, and CMake falls back to treating them as plain linker flags (e.g., -lbase64), which leads to linker errors.

Enabling the following before FetchContent_MakeAvailable resolves the issue:

set(CCR_FETCH_DEPS ON CACHE BOOL "")

With this option enabled, FetchContent successfully pulls in and builds all required dependencies.

It would be helpful if:

  • The CCR_FETCH_DEPS option was documented in the README
  • Or dependencies were handled more transparently by default
  • Or a minimal working FetchContent example was provided

Thanks!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions