Skip to content

Commit

Permalink
Introduced a MINIMUM_hidapi_VERSION variable to avoid repeat the vers…
Browse files Browse the repository at this point in the history
…ion number literaly
  • Loading branch information
daschuer authored Aug 17, 2021
1 parent dc69785 commit 826617f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2607,15 +2607,16 @@ option(HID "USB HID controller support" ON)
if(HID)
find_package(hidapi)
# hidapi_VERSION is only available starting with 0.10.0
if(NOT hidapi_FOUND OR NOT hidapi_VERSION OR hidapi_VERSION VERSION_LESS 0.10.1)
set(MINIMUM_hidapi_VERSION "0.10.1")
if(NOT hidapi_FOUND OR NOT hidapi_VERSION OR hidapi_VERSION VERSION_LESS MINIMUM_hidapi_VERSION)
if(hidapi_FOUND)
if(hidapi_VERSION)
message(STATUS "Found libhidapi version: ${hidapi_VERSION}")
else()
message(STATUS "Found libhidapi version < 0.10.0")
message(STATUS "Found libhidapi version < ${MINIMUM_hidapi_VERSION}")
endif()
endif()
message(STATUS "Linking internal libhidapi 0.10.1 statically")
message(STATUS "Linking internal libhidapi ${MINIMUM_hidapi_VERSION} statically")
add_library(mixxx-hidapi STATIC EXCLUDE_FROM_ALL)
target_include_directories(mixxx-hidapi SYSTEM PUBLIC lib/hidapi/hidapi)
if(WIN32)
Expand Down

0 comments on commit 826617f

Please sign in to comment.