Skip to content

Commit

Permalink
Findhidapi.cmake debug
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Aug 18, 2021
1 parent f73217a commit 3d271be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/modules/Findhidapi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
mark_as_advanced(hidapi-hidraw_LIBRARY)
endif()

message(STATUS "PC_hidapi_VERSION ${PC_hidapi_VERSION} ${hidapi_INCLUDE_DIR}/hidapi.h")

# Version detection
if(DEFINED PC_hidapi_VERSION)
set(hidapi_VERSION "${PC_hidapi_VERSION}")
Expand All @@ -85,6 +87,7 @@ else()
set(hidapi_VERSION_PATCH "${CMAKE_MATCH_1}")
# hidapi_VERSION is only available starting with 0.10.0
# Simply using if(NOT) does not work because 0 is a valid value, so compare to empty string.
message(STATUS "hidapi_VERSION_MAJOR ${hidapi_VERSION_MAJOR}")
if (NOT hidapi_VERSION_MAJOR STREQUAL "" AND
NOT hidapi_VERSION_MINOR STREQUAL "" AND
NOT hidapi_VERSION_PATCH STREQUAL "")
Expand Down

0 comments on commit 3d271be

Please sign in to comment.