William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 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 | |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 15 | libcr51sign_deps = [dependency('libcrypto')] |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 16 | |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 17 | libcr51sign_cflags = ['-Wno-pedantic', '-Wno-implicit-fallthrough'] |
William A. Kennington III | ba30c10 | 2021-11-02 19:48:39 -0700 | [diff] [blame] | 18 | |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 19 | libcr51sign_pre = declare_dependency( |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 20 | include_directories: libcr51sign_includes, |
| 21 | compile_args: libcr51sign_cflags, |
| 22 | dependencies: libcr51sign_deps, |
| 23 | ) |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 24 | |
| 25 | libcr51sign_lib = library( |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 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 | ) |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 39 | |
| 40 | libcr51sign_dep = declare_dependency( |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 41 | link_with: libcr51sign_lib, |
| 42 | dependencies: libcr51sign_pre, |
| 43 | ) |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 44 | |
| 45 | libcr51sign_reqs = [] |
| 46 | foreach dep : libcr51sign_deps |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 47 | if dep.type_name() == 'pkgconfig' |
| 48 | libcr51sign_reqs += dep |
| 49 | endif |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 50 | endforeach |
| 51 | |
| 52 | import('pkgconfig').generate( |
Patrick Williams | 24c61c7 | 2025-02-01 08:38:07 -0500 | [diff] [blame] | 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 | ) |