Private
Public Access
2
0

tools: add new tools directory

This is the start of the series of commits focussed on
cleaning up the exmaples/ directory.

This commit moves mraa-gpio, mraa-i2c, mraa-uart files
out of examples directory into new tools directory. Moved
files are the good cadidates to be treated as tools
instead of examples.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Manivannan Sadhasivam
2017-10-20 13:56:58 +05:30
committed by Brendan Le Foll
parent c24a8f8b20
commit ec26f92fe6
6 changed files with 26 additions and 18 deletions

22
tools/CMakeLists.txt Normal file
View File

@@ -0,0 +1,22 @@
add_executable (mraa-gpio mraa-gpio.c)
add_executable (mraa-i2c mraa-i2c.c)
add_executable (mraa-uart mraa-uart.c)
include_directories (${PROJECT_SOURCE_DIR}/api)
# FIXME Hack to access mraa internal types used by mraa-i2c
include_directories (${PROJECT_SOURCE_DIR}/include)
include_directories (${PROJECT_SOURCE_DIR}/api/mraa)
target_link_libraries (mraa-gpio mraa)
target_link_libraries (mraa-i2c mraa)
target_link_libraries (mraa-uart mraa)
if (INSTALLGPIOTOOL AND NOT INSTALLTOOLS)
install (TARGETS mraa-gpio DESTINATION bin)
endif()
if (INSTALLTOOLS)
install (TARGETS mraa-gpio DESTINATION bin)
install (TARGETS mraa-i2c DESTINATION bin)
install (TARGETS mraa-uart DESTINATION bin)
endif()