mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
24 lines
417 B
CMake
24 lines
417 B
CMake
|
|
||
|
project(serialport)
|
||
|
|
||
|
include_directories(../../include)
|
||
|
|
||
|
## Sources
|
||
|
set(serial_SRCS
|
||
|
src/serial.cc
|
||
|
../../include/serial/serial.h
|
||
|
../../include/serial/v8stdint.h)
|
||
|
|
||
|
if(UNIX)
|
||
|
list(APPEND serial_SRCS src/impl/unix.cc)
|
||
|
else()
|
||
|
list(APPEND serial_SRCS src/impl/win.cc)
|
||
|
endif()
|
||
|
|
||
|
## Add serial library
|
||
|
add_library(${PROJECT_NAME} ${serial_SRCS})
|
||
|
|
||
|
if(UNIX AND NOT APPLE)
|
||
|
target_link_libraries(${PROJECT_NAME} rt)
|
||
|
endif()
|