kmpkg add
Synopsis
kmpkg add port [options] <port-name>...
Description
The kmpkg add port command allows you to update the kmpkg.json manifest file by adding new package dependencies to your C++ project.
You can specify one or multiple port names to add. It's also possible to define specific features of a port that you would like to include as a dependency. The manifest (kmpkg.json) will then be updated to reflect these changes.
Examples
Sample manifest:
{
"name": "Example",
"version": "1.0"
}
To add ports - fmt, sqlitecpp, zlib:
kmpkg add port fmt sqlitecpp zlib
{
"name": "Example",
"version": "1.0",
"dependencies": [
"fmt",
"zlib",
"sqlitecpp"
]
}
To specify port with feature - sqlitecpp[sqlcipher]
kmpkg add port sqlitecpp[sqlcipher]
{
"name": "Example",
"version": "1.0",
"dependencies": [
"fmt",
{
"name": "sqlitecpp",
"features": [
"sqlcipher"
]
},
"zlib"
]
}
The
kmpkg add portcommand does not validate the existence of specified features for a port. Ensure that the feature exists before adding it to the manifest.
Options
All kmpkg commands support a set of common options.
port
kmpkg add port <port-name>... adds the specified ports to the manifest if it's not already present.