Skip to content

[EXPERIMENTAL] Add support for vcpkg #293

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

Closed
wants to merge 1 commit into from

Conversation

stevapple
Copy link

Windows developers have a relatively difficult experience for pulling in dependencies. This patch adds support for vcpkg's manifest mode, which can seamlessly integrate with CMake.

@stevapple
Copy link
Author

@tomerd This one is not WIP👀 The only thing we should do is to add such a manifest.

And it just automatically works.

@stevapple
Copy link
Author

Anyone to merge?

@neonichu
Copy link
Contributor

What exactly does this do and how is it used?

@stevapple
Copy link
Author

@neonichu This adds a manifest file of vcpkg, allowing us to have:

-DCMAKE_TOOLCHAIN_FILE=[vcpkg-root]/scripts/buildsystems/vcpkg.cmake

flag passed on CMake, to let vcpkg provide the CMake packages for us, without having to install them in the system.

vcpkg will build everything from source and cache the artifacts across builds.

@compnerd
Copy link
Member

The official builds and documentation don't install them on the system, they build them as part of the toolchain.

@tomerd
Copy link
Contributor

tomerd commented Mar 15, 2022

@compnerd confused on how this relates to the toolchain build machinery already in place. should discuss this some more with @shahmishal and team?

@stevapple
Copy link
Author

The official builds and documentation don't install them on the system, they build them as part of the toolchain.

I don’t think that’s the case for SQLite3 here. We’re never building SQLite along with the toolchain.

@compnerd
Copy link
Member

I don’t think that’s the case for SQLite3 here. We’re never building SQLite along with the toolchain.

We actually do build SQLite3 from source as well.
https://github.com/apple/swift/blob/main/utils/build-windows-toolchain.bat#L56-L68

@stevapple
Copy link
Author

I don’t think that’s the case for SQLite3 here. We’re never building SQLite along with the toolchain.

We actually do build SQLite3 from source as well. https://github.com/apple/swift/blob/main/utils/build-windows-toolchain.bat#L56-L68

vcpkg support is not meant for production now. It is used to ease anyone who wants to build and test their own copy.
Official build can continue to use manually built artifacts, as long as you don’t import vcpkg to CMake.

@compnerd
Copy link
Member

vcpkg support is not meant for production now. It is used to ease anyone who wants to build and test their own copy. Official build can continue to use manually built artifacts, as long as you don’t import vcpkg to CMake.

Sure, but then does it make sense to perhaps have this be residing elsewhere?

@stevapple
Copy link
Author

stevapple commented Mar 15, 2022

@compnerd I believe we’d better place it within our repo to keep it tracked if the dependencies change. Alternatively, we can pull in another repo containing only vcpkg manifests. Since vcpkg support will be documented, it’s not ideal for me to provide it with any non-apple repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants