summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2020-08-17 15:13:36 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2020-08-17 15:13:36 +0200
commit3e36af0431cc5ec9d6c4176eb280386e557a0d40 (patch)
treec7584a452627c325393aa28f3b75cc05626d071a /CMakeLists.txt
parent080b88a018e0cca01d3e89ef264173c332ab4eeb (diff)
parent7a8615fa97cd2a3fae877665855bf7f5caf6bcc1 (diff)
downloadlibnitrokey-3e36af0431cc5ec9d6c4176eb280386e557a0d40.tar.gz
libnitrokey-3e36af0431cc5ec9d6c4176eb280386e557a0d40.tar.bz2
Merge branch '183-feat-add-freebsd-build-support'
Add support for building on FreeBSD Fixes #183
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db8d2fb..0d236f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,7 +81,11 @@ IF(APPLE)
ELSEIF(UNIX)
# add_library(hidapi-libusb STATIC hidapi/libusb/hid.c )
find_package(PkgConfig)
- pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi-libusb)
+ IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi)
+ ELSE()
+ pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi-libusb)
+ ENDIF()
target_compile_options(nitrokey PRIVATE ${HIDAPI_LIBUSB_CFLAGS})
target_link_libraries(nitrokey ${HIDAPI_LIBUSB_LDFLAGS})
ELSEIF(WIN32)