aboutsummaryrefslogtreecommitdiff
path: root/shared/pb.cmake
blob: 71a28cbbf255414542ede362d4f748581347f631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if(DEFINED ARDUINO)
	set(PBDRV_ARDUINO true)
endif()

include_directories(${CMAKE_CURRENT_LIST_DIR})

list(APPEND PBDRV_SRCS "${CMAKE_CURRENT_LIST_DIR}/pb/moddrv.c")

if(PBDRV_ARDUINO)
	list(APPEND PBDRV_SRCS "${CMAKE_CURRENT_LIST_DIR}/pb/drv/arduino/mod.cpp")
endif()

add_library(pbdrv-mod STATIC ${PBDRV_SRCS})

if(PBDRV_ARDUINO)
	target_link_arduino_libraries(pbdrv-mod
		core
		Wire
		)
endif()