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

Replace PMM with vcpkg.json generation + bootstrapping #23

Closed
mrexodia opened this issue May 23, 2021 · 2 comments · Fixed by #27
Closed

Replace PMM with vcpkg.json generation + bootstrapping #23

mrexodia opened this issue May 23, 2021 · 2 comments · Fixed by #27
Labels
feature New feature
Milestone

Comments

@mrexodia
Copy link
Contributor

mrexodia commented May 23, 2021

PMM is awfully complicated and does not work properly. Replace it with modern vcpkg.

[project]
name = "my_project"
version = "1.2"

[vcpkg]
version = "2021.05.12"
packages = ["fmt", "sqlite3"]

Should generate vcpkg.json (take care of the vcpkg identifiers not allowing capital letters or underscores):

{
  "name": "vcpkg_template",
  "version": "0.0.1",
  "dependencies": ["fmt", "sqlite3"]
}

And (right after the project):

include(FetchContent)

message(STATUS "Fetching vcpkg...")
FetchContent_Declare(
	vcpkg
	URL
		https://github.com/microsoft/vcpkg/archive/refs/tags/2021.05.12.tar.gz
)
FetchContent_MakeAvailable(vcpkg)

include(${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake)

See: https://github.com/build-cpp/vcpkg_template/tree/simplified-vscode. It also needs some kind of handling for subprojects (that scenario is not supported by vcpkg according to one of the authors) and it would be best if you get error messages that certain packages need to be specified in the root project for it to work.

@mrexodia mrexodia added the feature New feature label May 23, 2021
@mrexodia mrexodia added this to the v0.2.0 milestone May 23, 2021
@mrexodia mrexodia changed the title Replace PMM with vcpkg.json generation + bootstrapping Replace PMM with vcpkg.json generation + bootstrapping May 23, 2021
@MoAlyousef
Copy link
Contributor

Hi
I've created a new branch called "manifest" with support for vcpkg manifest mode. I chose (& vendored) nlohmann/json for vcpkg.json generation. I think the next step is to also support versions and features for each dependency:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
  "name": "my-application",
  "version": "0.15.2",
  "dependencies": [
    "boost-system",
    {
      "name": "cpprestsdk",
      "default-features": false
    },
    "libxml2",
    "yajl"
  ]
}

@mrexodia
Copy link
Contributor Author

Awesome, I’ll take a look! Maybe open a PR so it’s easier to review?

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

Successfully merging a pull request may close this issue.

2 participants