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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user