Cppkg
cmake dependencies auto install package
Add dependencies
First. Search package
cppm cppkg search Catch
Name Version Repository Description Use
===================================================================================================================================================================
Catch2 git cppkg modern, C++-native, header-only, test framework f$Catch2="git"
Catch2 2.9.1 cppkg modern, C++-native, header-only, test framework f$Catch2="2.9.1"
Catch latest hunter https://docs.hunter.sh/en/latest/packages/pkg/Catch.html#index-
# hunter example Catch2 = {module="Catch2", hunter=true} Second. add this option in cppm.toml
[dependencies]
exam = {module="exam::exam", version="latest"}
Catch2 = "2.9.1"
# Catch2 = {module="Catch2", hunter=true} If you can't find package, add new package in local repo
Generate New Cppkg and Add your local repository
First. Initialize cppkg
Second. Edit exam.toml file
Third. Build exam.toml
Fourth. Add options in cppkg.toml and eaxm.cmake.in
cmake.findlib options, auto install your project 'cmake/Modules' path Find{name}.cmake is none cmake project finder 'download_package()' is External_Project_Add wrapper
Fifth. Add cppkg in your local repository
Fast Add and Generate Cppkg
if dependency is cmake base project, you can add too simple git repo default version is lastest Option: --git [-g] {repo} :add git repo --git_tag [-t] {tag} :add git tag --global : not cppm local install --help [-h] :show cppm command and options --module [-m] {module} :add module name --p [-p] :cmake base library install to local cppkg repo, Require --url or --git --url [-u] {url} :add url repo Require --version --version [-v] {version} :add library version Require --version --p [-p] :cmake base library install to local cppkg repo, Require --url or --git
Last updated
Was this helpful?