Cmake hidapi fixed conditional build
This commit is contained in:
Vendored
+6
-10
@@ -1,11 +1,5 @@
|
|||||||
set(HIDAPI_HPP "hidapi/hidapi/hidapi.h")
|
set(HIDAPI_HPP "hidapi/hidapi/hidapi.h")
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
set(HIDAPI_SRC "hidapi/mac/hid.c")
|
|
||||||
list(APPEND HIDAPI_HPP
|
|
||||||
"hidapi/mac/hidapi_darwin.h")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(HIDAPI_SRC "hidapi/windows/hid.c" "hidapi/windows/hidapi_descriptor_reconstruct.c")
|
set(HIDAPI_SRC "hidapi/windows/hid.c" "hidapi/windows/hidapi_descriptor_reconstruct.c")
|
||||||
list(APPEND HIDAPI_HPP
|
list(APPEND HIDAPI_HPP
|
||||||
@@ -15,10 +9,12 @@ if(WIN32)
|
|||||||
"hidapi/windows/hidapi_hidpi.h"
|
"hidapi/windows/hidapi_hidpi.h"
|
||||||
"hidapi/windows/hidapi_hidsdi.h"
|
"hidapi/windows/hidapi_hidsdi.h"
|
||||||
"hidapi/windows/hidapi_winapi.h")
|
"hidapi/windows/hidapi_winapi.h")
|
||||||
endif()
|
elseif(APPLE)
|
||||||
|
set(HIDAPI_SRC "hidapi/mac/hid.c")
|
||||||
if(UNIX)
|
list(APPEND HIDAPI_HPP
|
||||||
set(HIDAPI_SRC "hidapi/linux/hid.c")
|
"hidapi/mac/hidapi_darwin.h")
|
||||||
|
else() #Unix
|
||||||
|
set(HIDAPI_SRC "hidapi/linux/hid.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
source_group("" FILES ${HIDAPI_SRC} ${HIDAPI_HPP})
|
source_group("" FILES ${HIDAPI_SRC} ${HIDAPI_HPP})
|
||||||
|
|||||||
Reference in New Issue
Block a user