Private
Public Access
2
0

src/CMakeLists.txt: Use AndroidThings find_package

Use the cmake module provided by AndroidThings for setting libs/hdrs
instead of the hard-coded path to the AndroidThings library.  This
requires adding a path to CMAKE_MODULE_PATH which contains
FindAndroidThings.cmake.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2017-04-11 01:42:22 -07:00
parent 34b4d4a97b
commit 1d200840f4

View File

@@ -137,9 +137,12 @@ if (MOCKPLAT)
endif()
if (PERIPHERALMAN)
add_subdirectory(peripheralman)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPERIPHERALMAN=1")
set (mraa_LIBS ${mraa_LIBS} -l/home/brendan/git/mraa/libperipheralman.so)
# Use the find_package provided by Android Things. Make sure this is
# available in CMAKE_MODULE_PATH.
find_package(AndroidThings REQUIRED)
set (mraa_LIBS ${mraa_LIBS} ${ANDROIDTHINGS_LIBRARIES})
add_subdirectory(peripheralman)
endif()
if (USBPLAT)