diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2020-08-20 14:58:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2020-08-20 14:58:59 +0200 |
commit | a6e21cc458147ef028e0a77784b7ec43c6be6d1e (patch) | |
tree | 8479d71e32e802280cd36c0f8d7d4a0413e89b47 /CMakeLists.txt | |
parent | 3e36af0431cc5ec9d6c4176eb280386e557a0d40 (diff) | |
parent | ad04be95f8baea5818919eb27e78c2926733a8cb (diff) | |
download | libnitrokey-a6e21cc458147ef028e0a77784b7ec43c6be6d1e.tar.gz libnitrokey-a6e21cc458147ef028e0a77784b7ec43c6be6d1e.tar.bz2 |
Merge branch '185-feat-adapt-hidapi-dependency-in-pkgconfig'pre-v3.6
Fix libnitrokey-1.pc generation on FreeBSD
Fixes #185
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d236f8..119ca79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,6 +73,8 @@ set(SOURCE_FILES set(BUILD_SHARED_LIBS ON CACHE BOOL "Build all libraries as shared") add_library(nitrokey ${SOURCE_FILES}) +set(HIDAPI_LIBUSB_NAME hidapi-libusb) + IF(APPLE) include_directories(hidapi/hidapi) add_library(hidapi-libusb STATIC hidapi/mac/hid.c ) @@ -83,6 +85,7 @@ ELSEIF(UNIX) find_package(PkgConfig) IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi) + set(HIDAPI_LIBUSB_NAME hidapi) ELSE() pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi-libusb) ENDIF() |