build-cpp / cmkr

Modern build system based on CMake and TOML.
https://cmkr.build
MIT License
439 stars 27 forks source link

Bootstrap Vcpkg prior to FetchContent #45

Closed cursey closed 2 years ago

cursey commented 2 years ago

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

mrexodia commented 2 years ago

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 commented 2 years ago

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

cursey commented 2 years ago

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 :)