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 | |
| 15 | libcr51sign_deps = [ |
| 16 | dependency('libcrypto'), |
| 17 | ] |
| 18 | |
William A. Kennington III | ba30c10 | 2021-11-02 19:48:39 -0700 | [diff] [blame] | 19 | libcr51sign_cflags = [ |
Willy Tu | dca92e4 | 2023-11-16 23:22:07 -0800 | [diff] [blame] | 20 | '-Wno-pedantic', |
| 21 | '-Wno-implicit-fallthrough' |
William A. Kennington III | ba30c10 | 2021-11-02 19:48:39 -0700 | [diff] [blame] | 22 | ] |
| 23 | |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 24 | libcr51sign_pre = declare_dependency( |
| 25 | include_directories: libcr51sign_includes, |
William A. Kennington III | ba30c10 | 2021-11-02 19:48:39 -0700 | [diff] [blame] | 26 | compile_args: libcr51sign_cflags, |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 27 | dependencies: libcr51sign_deps) |
| 28 | |
| 29 | libcr51sign_lib = library( |
| 30 | 'cr51sign', |
| 31 | 'libcr51sign.c', |
| 32 | 'libcr51sign_support.c', |
Willy Tu | dca92e4 | 2023-11-16 23:22:07 -0800 | [diff] [blame] | 33 | 'libcr51sign_mauv.c', |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 34 | dependencies: libcr51sign_pre, |
William A. Kennington III | 1c9a17e | 2022-02-11 15:51:23 -0800 | [diff] [blame] | 35 | c_args: [ |
| 36 | # Temporarily ignore until updates land |
| 37 | '-Wno-error=deprecated-declarations', |
| 38 | ], |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 39 | implicit_include_directories: false, |
| 40 | version: meson.project_version(), |
| 41 | install: true) |
| 42 | |
| 43 | libcr51sign_dep = declare_dependency( |
| 44 | link_with: libcr51sign_lib, |
| 45 | dependencies: libcr51sign_pre) |
| 46 | |
| 47 | libcr51sign_reqs = [] |
| 48 | foreach dep : libcr51sign_deps |
| 49 | if dep.type_name() == 'pkgconfig' |
| 50 | libcr51sign_reqs += dep |
| 51 | endif |
| 52 | endforeach |
| 53 | |
| 54 | import('pkgconfig').generate( |
| 55 | libcr51sign_lib, |
| 56 | name: 'libcr51sign', |
| 57 | description: 'CR51 signing verification utilities', |
| 58 | requires: libcr51sign_reqs, |
William A. Kennington III | ba30c10 | 2021-11-02 19:48:39 -0700 | [diff] [blame] | 59 | extra_cflags: libcr51sign_cflags, |
William A. Kennington III | 5acaca2 | 2021-10-28 16:32:33 -0700 | [diff] [blame] | 60 | version: meson.project_version()) |