blob: c2550e596c47ae3df527d4bc304c46ad0afdd33e [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 = [
20 '-DOMIT_VARIABLE_ARRAYS',
21]
22
William A. Kennington III5acaca22021-10-28 16:32:33 -070023libcr51sign_pre = declare_dependency(
24 include_directories: libcr51sign_includes,
William A. Kennington IIIba30c102021-11-02 19:48:39 -070025 compile_args: libcr51sign_cflags,
William A. Kennington III5acaca22021-10-28 16:32:33 -070026 dependencies: libcr51sign_deps)
27
28libcr51sign_lib = library(
29 'cr51sign',
30 'libcr51sign.c',
31 'libcr51sign_support.c',
32 dependencies: libcr51sign_pre,
William A. Kennington III1c9a17e2022-02-11 15:51:23 -080033 c_args: [
34 # Temporarily ignore until updates land
35 '-Wno-error=deprecated-declarations',
36 ],
William A. Kennington III5acaca22021-10-28 16:32:33 -070037 implicit_include_directories: false,
38 version: meson.project_version(),
39 install: true)
40
41libcr51sign_dep = declare_dependency(
42 link_with: libcr51sign_lib,
43 dependencies: libcr51sign_pre)
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,
William A. Kennington IIIba30c102021-11-02 19:48:39 -070057 extra_cflags: libcr51sign_cflags,
William A. Kennington III5acaca22021-10-28 16:32:33 -070058 version: meson.project_version())