2016-09-27 13:07:45 +01:00
|
|
|
add_executable (imraa imraa.c imraa_arduino.c imraa_io.c imraa_lock.c)
|
2016-03-15 17:32:18 -04:00
|
|
|
|
|
|
|
|
include_directories (${PROJECT_SOURCE_DIR}/api)
|
|
|
|
|
include_directories (${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
include_directories (${PROJECT_SOURCE_DIR}/api/mraa)
|
2016-09-21 14:36:38 +01:00
|
|
|
include_directories (${PROJECT_SOURCE_DIR}/imraa)
|
2016-03-15 17:32:18 -04:00
|
|
|
|
2016-09-21 14:36:38 +01:00
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DIMRAA=1")
|
2016-03-15 17:32:18 -04:00
|
|
|
|
|
|
|
|
find_package (JSON-C REQUIRED)
|
|
|
|
|
include_directories (${JSON-C_INCLUDE_DIR})
|
2016-03-17 15:21:02 -04:00
|
|
|
find_package (UDEV REQUIRED)
|
|
|
|
|
include_directories (${UDEV_INCLUDE_DIR})
|
|
|
|
|
target_link_libraries (imraa mraa ${JSON-C_LIBRARIES} ${UDEV_LIBRARIES})
|
2016-03-15 17:32:18 -04:00
|
|
|
|
|
|
|
|
set_property (TARGET imraa PROPERTY C_STANDARD 99)
|
|
|
|
|
|
|
|
|
|
install (TARGETS imraa DESTINATION bin)
|