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 = [
16  dependency('libcrypto'),
17]
18
19libcr51sign_pre = declare_dependency(
20  include_directories: libcr51sign_includes,
21  dependencies: libcr51sign_deps)
22
23libcr51sign_lib = library(
24  'cr51sign',
25  'libcr51sign.c',
26  'libcr51sign_support.c',
27  dependencies: libcr51sign_pre,
28  implicit_include_directories: false,
29  version: meson.project_version(),
30  install: true)
31
32libcr51sign_dep = declare_dependency(
33  link_with: libcr51sign_lib,
34  dependencies: libcr51sign_pre)
35
36libcr51sign_reqs = []
37foreach dep : libcr51sign_deps
38  if dep.type_name() == 'pkgconfig'
39    libcr51sign_reqs += dep
40  endif
41endforeach
42
43import('pkgconfig').generate(
44  libcr51sign_lib,
45  name: 'libcr51sign',
46  description: 'CR51 signing verification utilities',
47  requires: libcr51sign_reqs,
48  version: meson.project_version())
49