mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
support for mxe
This commit is contained in:
parent
8fe085c45f
commit
49b6762927
@ -38,9 +38,10 @@ elseif(UNIX)
|
||||
# If unix
|
||||
list(APPEND serial_SRCS src/impl/unix.cc)
|
||||
list(APPEND serial_SRCS src/impl/list_ports/list_ports_linux.cc)
|
||||
elseif()
|
||||
else()
|
||||
# If windows
|
||||
list(APPEND serial_SRCS src/impl/win.cc)
|
||||
list(APPEND serial_SRCS src/impl/list_ports/list_ports_win.cc)
|
||||
endif()
|
||||
|
||||
## Add serial library
|
||||
@ -49,6 +50,8 @@ if(APPLE)
|
||||
target_link_libraries(${PROJECT_NAME} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY})
|
||||
elseif(UNIX)
|
||||
target_link_libraries(${PROJECT_NAME} rt pthread)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} setupapi)
|
||||
endif()
|
||||
|
||||
## Uncomment for example
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "serial/serial.h"
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
#include <SetupAPI.h>
|
||||
#include <setupapi.h>
|
||||
#include <devguid.h>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user