1 # Assume that luci and related libraries and headers are installed on overlay directory
6 NAMES loco.h luci/IR/CircleNode.h
7 PATHS ${EXT_OVERLAY_DIR}/include)
9 macro(_load_library LUCI_NAME)
10 add_library(luci::${LUCI_NAME} SHARED IMPORTED)
11 find_library(LUCI_LIB_PATH_${LUCI_NAME} NAMES luci_${LUCI_NAME} PATHS ${EXT_OVERLAY_DIR}/lib)
12 if (NOT LUCI_LIB_PATH_${LUCI_NAME})
15 set_target_properties(luci::${LUCI_NAME} PROPERTIES
16 IMPORTED_LOCATION ${LUCI_LIB_PATH_${LUCI_NAME}}
17 INTERFACE_INCLUDE_DIRECTORIES ${LUCI_HEADERS})
26 _load_library(partition)
29 _load_library(profile)
30 _load_library(service)
32 # Need luci::loco to avoid "DSO missing from command line" link error
33 # TODO Find better way to do this
34 add_library(luci::loco SHARED IMPORTED)
35 find_library(LOCO_LIB_PATH NAMES loco PATHS ${EXT_OVERLAY_DIR}/lib)
36 if (NOT LOCO_LIB_PATH)
39 set_target_properties(luci::loco PROPERTIES
40 IMPORTED_LOCATION ${LOCO_LIB_PATH}
41 INTERFACE_INCLUDE_DIRECTORIES ${LUCI_HEADERS})