xref: /openbmc/google-misc/subprojects/libcr51sign/src/meson.build (revision 24c61c7ee8583830fd0916b7b2c7bf0561569e0f)
1# Copyright 2021 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15libcr51sign_deps = [dependency('libcrypto')]
16
17libcr51sign_cflags = ['-Wno-pedantic', '-Wno-implicit-fallthrough']
18
19libcr51sign_pre = declare_dependency(
20    include_directories: libcr51sign_includes,
21    compile_args: libcr51sign_cflags,
22    dependencies: libcr51sign_deps,
23)
24
25libcr51sign_lib = library(
26    'cr51sign',
27    'libcr51sign.c',
28    'libcr51sign_support.c',
29    'libcr51sign_mauv.c',
30    dependencies: libcr51sign_pre,
31    c_args: [
32        # Temporarily ignore until updates land
33        '-Wno-error=deprecated-declarations',
34    ],
35    implicit_include_directories: false,
36    version: meson.project_version(),
37    install: true,
38)
39
40libcr51sign_dep = declare_dependency(
41    link_with: libcr51sign_lib,
42    dependencies: libcr51sign_pre,
43)
44
45libcr51sign_reqs = []
46foreach dep : libcr51sign_deps
47    if dep.type_name() == 'pkgconfig'
48        libcr51sign_reqs += dep
49    endif
50endforeach
51
52import('pkgconfig').generate(
53    libcr51sign_lib,
54    name: 'libcr51sign',
55    description: 'CR51 signing verification utilities',
56    requires: libcr51sign_reqs,
57    extra_cflags: libcr51sign_cflags,
58    version: meson.project_version(),
59)
60