Skip to content

Bootstrap Vcpkg prior to FetchContent#45

Merged
mrexodia merged 1 commit intobuild-cpp:mainfrom
cursey:bootstrap-vcpkg-early
Dec 28, 2021
Merged

Bootstrap Vcpkg prior to FetchContent#45
mrexodia merged 1 commit intobuild-cpp:mainfrom
cursey:bootstrap-vcpkg-early

Conversation

@cursey
Copy link
Copy Markdown
Contributor

@cursey cursey commented Dec 28, 2021

This change bootstraps Vcpkg prior to any FetchContent. This makes it so you can FetchContent libraries that use Vcpkg for their own dependencies.

@mrexodia
Copy link
Copy Markdown
Contributor

Ahh, I misunderstood your description. I discussed this specific topic with the vcpkg devs and they said it is unsupported to include vcpkg multiple times in the same project.

The intended way to work around this is to include all the vcpkg dependencies in the root project. This means the fix is definitely necessary though, now the vcpkg in the root will be the first one and that’s probably what caused issues.

@mrexodia mrexodia merged commit 8ae2754 into build-cpp:main Dec 28, 2021
@mrexodia
Copy link
Copy Markdown
Contributor

I’ll release a new version in a few hours probably, gotta catch a plane first. Thanks again for your contributions!

@cursey
Copy link
Copy Markdown
Contributor Author

cursey commented Dec 28, 2021

Ahh, I misunderstood your description. I discussed this specific topic with the vcpkg devs and they said it is unsupported to include vcpkg multiple times in the same project.

The intended way to work around this is to include all the vcpkg dependencies in the root project. This means the fix is definitely necessary though, now the vcpkg in the root will be the first one and that’s probably what caused issues.

I was super tired when I wrote the description. What I meant was libraries added via FetchContent can find_package packages that the root project already includes via vcpkg. Which is exactly what the intended work around is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants