CMakeLists.txt中使用循环
编译一个安卓下的so,此so依赖其他的库,通过循环简化操作
set(UVC_LIBS UVCCamera uvc usb100 jpeg-turbo1500)
FOREACH(UVC_LIB ${UVC_LIBS})
add_library(${UVC_LIB} SHARED IMPORTED)
set_target_properties(${UVC_LIB} PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_SOURCE_DIR}/lib/${ANDROID_ABI}/lib${UVC_LIB}.so)
ENDFOREACH(UVC_LIB)