Skip to content

Commit 6279231

Browse files
committed
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 not in quotes because it 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 <[email protected]>
1 parent f17032b commit 6279231

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ if(NOT BUILD_ONLY_LIB)
194194

195195
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
196196
pkg_search_module (LIBPCSC REQUIRED libpcsclite)
197+
string (APPEND CMAKE_C_FLAGS ${LIBPCSC_CFLAGS})
197198
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
198199
set (LIBPCSC_LDFLAGS "winscard.lib")
199200
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

0 commit comments

Comments
 (0)