File tree Expand file tree Collapse file tree
docs/maintainer/example_recipes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ title : ' CMake packages'
3+ ---
4+
5+ If you want to package a CMake library to conda-forge, you can use this recipe template:
6+
7+ ``` yaml
8+ context :
9+ version : " 1.2.3"
10+
11+ package :
12+ name : example-package
13+ version : ${{ version }}
14+
15+ source :
16+ url : https://github.com/example-package/example-package/archive/refs/tags/v${{ version }}.tar.gz
17+ sha256 : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
18+
19+ build :
20+ number : 0
21+ script :
22+ content :
23+ - if : unix
24+ then :
25+ - cmake -B build -GNinja $CMAKE_ARGS .
26+ else :
27+ - cmake -B build -GNinja %CMAKE_ARGS% .
28+ - cmake --build build
29+ - cmake --install build
30+
31+ requirements :
32+ build :
33+ - ${{ stdlib('c') }}
34+ - ${{ compiler('c') }}
35+ - ${{ compiler('cxx') }} # optional
36+ - cmake
37+ - ninja
38+ host :
39+ # put any dependencies here
40+ run_exports :
41+ - ${{ pin_subpackage('example-package', upper_bound='x.x.x') }}
42+
43+ tests :
44+ - package_contents :
45+ lib :
46+ - example_package
47+
48+ about :
49+ homepage : https://github.com/example-package/example-package
50+ summary : Summary of the package.
51+ description : |
52+ Description of the package
53+ license : LGPL-3.0-or-later
54+ license_file :
55+ - COPYING
56+ documentation : https://github.com/example-package/example-package
57+ repository : https://github.com/example-package/example-package
58+
59+ extra :
60+ recipe-maintainers :
61+ - LandoCalrissian
62+ ` ` `
You can’t perform that action at this time.
0 commit comments