Debian Codegraph @

src/buildstream_plugins/elements/cmake.yaml

raw
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12
13 # CMake default configuration
14
15 variables:
16
17 build-dir: _builddir
18
19 # Project-wide extra arguments to be passed to `cmake`
20 cmake-global: ''
21
22 # Element-specific extra arguments to be passed to `cmake`.
23 cmake-local: ''
24
25 # The cmake generator to use
26 generator: Ninja
27
28 cmake-args: |
29
30 -DCMAKE_VERBOSE_MAKEFILE=ON \
31 -DCMAKE_INSTALL_PREFIX:PATH="%{prefix}" \
32 -DCMAKE_INSTALL_LIBDIR:PATH="%{lib}" %{cmake-global} %{cmake-local}
33
34 cmake: |
35
36 cmake -B%{build-dir} -H"%{conf-root}" -G"%{generator}" %{cmake-args}
37
38 make: cmake --build %{build-dir} -- ${JOBS}
39 make-install: env DESTDIR="%{install-root}" cmake --build %{build-dir} --target install
40
41 # Set this if the sources cannot handle parallelization.
42 #
43 # notparallel: True
44
45 config:
46
47 # Commands for configuring the software
48 #
49 configure-commands:
50 - |
51 %{cmake}
52
53 # Commands for building the software
54 #
55 build-commands:
56 - |
57 %{make}
58
59 # Commands for installing the software into a
60 # destination folder
61 #
62 install-commands:
63 - |
64 %{make-install}
65
66 # Commands for stripping debugging information out of
67 # installed binaries
68 #
69 strip-commands:
70 - |
71 %{strip-binaries}
72
73 # Use max-jobs CPUs for building and enable verbosity
74 environment:
75 JOBS: -j%{max-jobs}
76
77 # And dont consider JOBS as something which may
78 # affect build output.
79 environment-nocache:
80 - JOBS