blob: 1c473d2942a442285c0dff535be5cbea862c7df8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
https://bugs.gentoo.org/946066
https://github.com/Yubico/yubihsm-shell/issues/404
https://github.com/Yubico/yubihsm-shell/pull/411
From 440ba3ad140732ab51bc2df56ae0c82684d02922 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Tue, 30 Jul 2024 10:18:02 +0200
Subject: [PATCH] cmake: Fix build against pcsc-lite >= 2.2
The pcsc-lite 2.2.0 switched from autotools to meson and reworked the
pkgconfig files. The new pkg config provides CFLAGS that work ok, but
the yubihsm-shell ignores them and hopes that all included files are in
the default include directory (with the PCSC prefix).
Note, the value ${LIBPCSC_CFLAGS} is a semicolon separated list which
we need to split to separate items here.
This solution works with both old and new versions.
Fixes: #404
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index acbb3926..ecf3df85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,6 +194,8 @@ if(NOT BUILD_ONLY_LIB)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
pkg_search_module (LIBPCSC REQUIRED libpcsclite)
+ string (REPLACE ";" " " MY_LIBPCSC_CFLAGS "${LIBPCSC_CFLAGS}")
+ string (APPEND CMAKE_C_FLAGS " ${MY_LIBPCSC_CFLAGS}")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set (LIBPCSC_LDFLAGS "winscard.lib")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|