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:
committed by
Brendan Le Foll
parent
c24a8f8b20
commit
ec26f92fe6
22
tools/CMakeLists.txt
Normal file
22
tools/CMakeLists.txt
Normal 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()
|
||||
Reference in New Issue
Block a user