Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ find_path(HIDAPI_HEADER_DIR hidapi.h
)

if (BUILD_HIDAPI_SHARED)
find_library(HIDAPI_LIB NAMES hidapi-hidraw hidapi-libusb
# Under MSYS2 MinGW-w64 the filename of the import library is libhidapi.dll.a
find_library(HIDAPI_LIB NAMES hidapi-hidraw hidapi-libusb hidapi.dll
PATHS ../hidapi ../hidapi.git
PATH_SUFFIXES linux/.libs libusb/.libs linux libusb mac
DOC "The location of the HIDAPI shared library file"
Expand All @@ -54,7 +55,7 @@ else()
)
set(HIDAPI_STATIC_OBJECT ${HIDAPI_OBJECT})
find_package(PkgConfig REQUIRED)
if (HIDAPI_OBJECT MATCHES \(-libusb|/libusb/(.libs/)?hid\)\\.o\$)
if (HIDAPI_OBJECT MATCHES "\(-libusb|/libusb/(.libs/)?hid\)\\.o\$")
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
set(HIDAPI_LINK_LIBS ${LIBUSB_LIBRARIES} rt pthread)
else()
Expand Down
2 changes: 2 additions & 0 deletions libtempered/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ endif()

if (BUILD_SHARED_LIB)
add_library(tempered-shared SHARED ${libtempered_FILES})
target_link_libraries(tempered-shared ${HIDAPI_LINK_LIBS})
set_target_properties(tempered-shared PROPERTIES
OUTPUT_NAME tempered
SOVERSION 0
Expand All @@ -22,6 +23,7 @@ endif()

if (BUILD_STATIC_LIB)
add_library(tempered-static STATIC ${libtempered_FILES})
target_link_libraries(tempered-static ${HIDAPI_LINK_LIBS})
set_target_properties(tempered-static PROPERTIES
OUTPUT_NAME tempered
)
Expand Down