blob: ff33a0ccb51f1b1d4e62d44cea2ec8f391f3b404 [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
15libcr51sign_deps = [
16 dependency('libcrypto'),
17]
18
William A. Kennington IIIba30c102021-11-02 19:48:39 -070019libcr51sign_cflags = [
Willy Tudca92e42023-11-16 23:22:07 -080020 '-Wno-pedantic',
21 '-Wno-implicit-fallthrough'
William A. Kennington IIIba30c102021-11-02 19:48:39 -070022]
23
William A. Kennington III5acaca22021-10-28 16:32:33 -070024libcr51sign_pre = declare_dependency(
25 include_directories: libcr51sign_includes,
William A. Kennington IIIba30c102021-11-02 19:48:39 -070026 compile_args: libcr51sign_cflags,
William A. Kennington III5acaca22021-10-28 16:32:33 -070027 dependencies: libcr51sign_deps)
28
29libcr51sign_lib = library(
30 'cr51sign',
31 'libcr51sign.c',
32 'libcr51sign_support.c',
Willy Tudca92e42023-11-16 23:22:07 -080033 'libcr51sign_mauv.c',
William A. Kennington III5acaca22021-10-28 16:32:33 -070034 dependencies: libcr51sign_pre,
William A. Kennington III1c9a17e2022-02-11 15:51:23 -080035 c_args: [
36 # Temporarily ignore until updates land
37 '-Wno-error=deprecated-declarations',
38 ],
William A. Kennington III5acaca22021-10-28 16:32:33 -070039 implicit_include_directories: false,
40 version: meson.project_version(),
41 install: true)
42
43libcr51sign_dep = declare_dependency(
44 link_with: libcr51sign_lib,
45 dependencies: libcr51sign_pre)
46
47libcr51sign_reqs = []
48foreach dep : libcr51sign_deps
49 if dep.type_name() == 'pkgconfig'
50 libcr51sign_reqs += dep
51 endif
52endforeach
53
54import('pkgconfig').generate(
55 libcr51sign_lib,
56 name: 'libcr51sign',
57 description: 'CR51 signing verification utilities',
58 requires: libcr51sign_reqs,
William A. Kennington IIIba30c102021-11-02 19:48:39 -070059 extra_cflags: libcr51sign_cflags,
William A. Kennington III5acaca22021-10-28 16:32:33 -070060 version: meson.project_version())