blob: c84cdbf853faef82e3cec96f16b4ce690e8fd643 [file] [log] [blame]
William A. Kennington III5acaca22021-10-28 16:32:33 -07001# 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
Patrick Williams24c61c72025-02-01 08:38:07 -050015libcr51sign_deps = [dependency('libcrypto')]
William A. Kennington III5acaca22021-10-28 16:32:33 -070016
Patrick Williams24c61c72025-02-01 08:38:07 -050017libcr51sign_cflags = ['-Wno-pedantic', '-Wno-implicit-fallthrough']
William A. Kennington IIIba30c102021-11-02 19:48:39 -070018
William A. Kennington III5acaca22021-10-28 16:32:33 -070019libcr51sign_pre = declare_dependency(
Patrick Williams24c61c72025-02-01 08:38:07 -050020 include_directories: libcr51sign_includes,
21 compile_args: libcr51sign_cflags,
22 dependencies: libcr51sign_deps,
23)
William A. Kennington III5acaca22021-10-28 16:32:33 -070024
25libcr51sign_lib = library(
Patrick Williams24c61c72025-02-01 08:38:07 -050026 '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)
William A. Kennington III5acaca22021-10-28 16:32:33 -070039
40libcr51sign_dep = declare_dependency(
Patrick Williams24c61c72025-02-01 08:38:07 -050041 link_with: libcr51sign_lib,
42 dependencies: libcr51sign_pre,
43)
William A. Kennington III5acaca22021-10-28 16:32:33 -070044
45libcr51sign_reqs = []
46foreach dep : libcr51sign_deps
Patrick Williams24c61c72025-02-01 08:38:07 -050047 if dep.type_name() == 'pkgconfig'
48 libcr51sign_reqs += dep
49 endif
William A. Kennington III5acaca22021-10-28 16:32:33 -070050endforeach
51
52import('pkgconfig').generate(
Patrick Williams24c61c72025-02-01 08:38:07 -050053 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)