Private
Public Access
2
0

uart_ow: Make onewire functionality optional but on by default

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-04-14 13:52:09 +01:00
parent a379eb7bf6
commit 4a52ad6c4f
6 changed files with 24 additions and 5 deletions

View File

@@ -9,6 +9,11 @@ if (FIRMATA)
add_subdirectory (firmata)
endif ()
if (ONEWIRE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DONEWIRE=1")
add_subdirectory (uart_ow)
endif ()
include_directories(
${mraa_LIB_INCLUDE_DIRS}
)
@@ -23,7 +28,6 @@ set (mraa_LIB_SRCS_NOAUTO
${PROJECT_SOURCE_DIR}/src/uart/uart.c
${PROJECT_SOURCE_DIR}/src/iio/iio.c
${mraa_LIB_SRCS_NOAUTO}
${PROJECT_SOURCE_DIR}/src/uart_ow/uart_ow.c
)
set (mraa_LIB_X86_SRCS_NOAUTO

View File

@@ -29,6 +29,7 @@
'defines' : [ 'SWIG',
'SWIGJAVASCRIPT',
'FIRMATA=ON',
'ONEWIRE=ON',
'BUILDING_NODE_EXTENSION=1',
'SWIG_V8_VERSION=0x0<(v8_version)',
'V8_VERSION=0x0<(v8_version)'

View File

@@ -0,0 +1,7 @@
if (ONEWIRE)
message (STATUS "INFO - Adding onewire backend support")
set (mraa_LIB_SRCS_NOAUTO ${mraa_LIB_SRCS_NOAUTO}
${PROJECT_SOURCE_DIR}/src/uart_ow/uart_ow.c
PARENT_SCOPE
)
endif ()