Skip to content

Commit b5b593c

Browse files
committed
[#38]:svarga:build, add vcpkg manifest and registry portfile
1 parent 84a8ddd commit b5b593c

4 files changed

Lines changed: 86 additions & 0 deletions

File tree

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,37 @@ sudo cmake --install build
160160

161161
See `examples/cmake-integration/` for a complete working project.
162162

163+
## vcpkg
164+
165+
### Manifest mode
166+
167+
If you use vcpkg in [manifest mode](https://learn.microsoft.com/en-us/vcpkg/concepts/manifest-mode), run the following from the project root after cloning:
168+
169+
```bash
170+
vcpkg install
171+
```
172+
173+
This reads the `vcpkg.json` manifest and resolves the `llvm` dependency (with `clang` and `tools` features).
174+
175+
> **Note:** h5cpp-compiler is compatible with LLVM 18, 19, and 20. vcpkg currently provides `llvm` at 18.1.6.
176+
177+
### Registry port
178+
179+
To consume `h5cpp-compiler` through a custom vcpkg registry, copy the `vcpkg/` directory into your registry under `ports/h5cpp-compiler/`:
180+
181+
```
182+
ports/
183+
h5cpp-compiler/
184+
portfile.cmake
185+
vcpkg.json
186+
```
187+
188+
Add the port to your registry `versions/baseline.json`, then install it with:
189+
190+
```bash
191+
vcpkg install h5cpp-compiler
192+
```
193+
163194
## Compatibility
164195

165196
| h5cpp-compiler | h5cpp library |

vcpkg.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "h5cpp-compiler",
3+
"version": "1.12.6",
4+
"description": "Source code transformation tool for HDF5 H5CPP library",
5+
"homepage": "https://github.com/vargalabs/h5cpp-compiler",
6+
"license": "MIT",
7+
"supports": "!uwp",
8+
"$comment": "h5cpp-compiler is compatible with LLVM 18+, 19+, and 20. vcpkg provides llvm at 18.1.6.",
9+
"dependencies": [
10+
{
11+
"name": "llvm",
12+
"features": [
13+
"clang",
14+
"tools"
15+
]
16+
}
17+
]
18+
}

vcpkg/portfile.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO vargalabs/h5cpp-compiler
4+
REF "v${VERSION}"
5+
SHA512 fa3f5da1f028c5353c70387a94bd40543a27dbcdbd9ace8e0a8666978759018ab519dd60c17b1f99120e4cd48b2ff4bbbb56778efdd92787dd4fafcf1444dc28
6+
HEAD_REF staging
7+
)
8+
9+
vcpkg_cmake_configure(
10+
SOURCE_PATH "${SOURCE_PATH}"
11+
)
12+
13+
vcpkg_cmake_install()
14+
15+
vcpkg_cmake_config_fixup()
16+
17+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
18+
19+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYRIGHT.txt")

vcpkg/vcpkg.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "h5cpp-compiler",
3+
"version": "1.12.6",
4+
"description": "Source code transformation tool for HDF5 H5CPP library",
5+
"homepage": "https://github.com/vargalabs/h5cpp-compiler",
6+
"license": "MIT",
7+
"supports": "!uwp",
8+
"$comment": "h5cpp-compiler is compatible with LLVM 18+, 19+, and 20. vcpkg provides llvm at 18.1.6.",
9+
"dependencies": [
10+
{
11+
"name": "llvm",
12+
"features": [
13+
"clang",
14+
"tools"
15+
]
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)