Fixed build on Win32/Cygwin.
This commit is contained in:
parent
ec43d3ce9f
commit
60907768d0
|
@ -6,12 +6,18 @@ set(USBSIO_SRCS
|
|||
"src/lpcusbsio.c"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 OR CYGWIN)
|
||||
set(USBSIO_HIDAPI_SRCS "src/hid_api/win/hid.c")
|
||||
set(USBSIO_LIBRARIES
|
||||
"setupapi"
|
||||
)
|
||||
elseif(APPLE)
|
||||
set(USBSIO_HIDAPI_SRCS "src/hid_api/mac/hid.c")
|
||||
else()
|
||||
set(USBSIO_HIDAPI_SRCS "src/hid_api/linux/hid.c")
|
||||
set(USBSIO_LIBRARIES
|
||||
"udev"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(USBSIO_PRIVATE_INCS
|
||||
|
@ -22,13 +28,11 @@ set(USBSIO_INTERFACE_INCS
|
|||
"include"
|
||||
)
|
||||
|
||||
set(USBSIO_LIBRARIES
|
||||
"udev"
|
||||
)
|
||||
|
||||
|
||||
add_library(${PROJECT_NAME} ${USBSIO_SRCS} ${USBSIO_HIDAPI_SRCS})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${USBSIO_LIBRARIES})
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE ${USBSIO_PRIVATE_INCS}
|
||||
PUBLIC ${USBSIO_INTERFACE_INCS}
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue