Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ add_extension:

_subdirectory: "{{ add_extension }}"

add_vcpkg:
type: bool
default: false
help: Add vcpkg dependency management
when: "{{ add_extension in ['cpp', 'cppjswasm'] }}"

python_version_primary:
type: str
default: 3.11
Expand Down
4 changes: 4 additions & 0 deletions cpp/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:

- uses: actions-ext/cpp/setup@51c484ef64088c62434226039d0e3359f5fc8df6

{% if add_vcpkg -%}
- uses: actions-ext/cpp/setup-vcpkg-cache@6ded4958b7e13d73428138a01d53c33cb941121d

{% endif -%}
- name: Install dependencies
run: make develop

Expand Down
6 changes: 6 additions & 0 deletions cpp/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ __pycache__/
*.exp
*.lib

{% if add_vcpkg -%}
# vcpkg
vcpkg/
vcpkg_installed/

{% endif -%}
# Rust
target
target-capi
Expand Down
5 changes: 5 additions & 0 deletions cpp/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ packages = [
"{{ module }}",
"cpp",
]
{% if add_vcpkg %}
[tool.hatch.build.targets.sdist.force-include]
"vcpkg.json" = "vcpkg.json"
"vcpkg-overlays" = "vcpkg-overlays"
{% endif %}

[tool.hatch.build.targets.wheel]
packages = [
Expand Down
1 change: 1 addition & 0 deletions cpp/{% if add_vcpkg %}vcpkg-overlays{% endif %}/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 8 additions & 0 deletions cpp/{% if add_vcpkg %}vcpkg.json{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"dependencies": [],
"configuration": {
"overlay-ports": [
"vcpkg-overlays"
]
}
}
4 changes: 4 additions & 0 deletions cppjswasm/.github/workflows/build.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:

- uses: actions-ext/cpp/setup@51c484ef64088c62434226039d0e3359f5fc8df6

{% if add_vcpkg -%}
- uses: actions-ext/cpp/setup-vcpkg-cache@6ded4958b7e13d73428138a01d53c33cb941121d

{% endif -%}
- uses: mymindstorm/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16

- name: Install dependencies
Expand Down
6 changes: 6 additions & 0 deletions cppjswasm/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ __pycache__/
*.exp
*.lib

{% if add_vcpkg -%}
# vcpkg
vcpkg/
vcpkg_installed/

{% endif -%}
# Rust
target
target-capi
Expand Down
5 changes: 5 additions & 0 deletions cppjswasm/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ packages = [
"cpp",
"js",
]
{% if add_vcpkg %}
[tool.hatch.build.targets.sdist.force-include]
"vcpkg.json" = "vcpkg.json"
"vcpkg-overlays" = "vcpkg-overlays"
{% endif %}

[tool.hatch.build.targets.wheel]
packages = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 8 additions & 0 deletions cppjswasm/{% if add_vcpkg %}vcpkg.json{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"dependencies": [],
"configuration": {
"overlay-ports": [
"vcpkg-overlays"
]
}
}
1 change: 1 addition & 0 deletions examples/cpp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
add_docs: true
add_vcpkg: true
add_wiki: true
add_extension: cpp
email: 3105306+timkpaine@users.noreply.github.com
Expand Down
1 change: 1 addition & 0 deletions examples/cppjswasm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
add_docs: true
add_vcpkg: true
add_wiki: true
add_extension: cppjswasm
email: 3105306+timkpaine@users.noreply.github.com
Expand Down
Loading