我想在构建脚本中添加 features2d 以便使用bazel构建opencv。 Here是要添加此模块的构建脚本。
除了 features2d 外,我能够添加一些其他模块,因为在该模块内部,它包含一些* .i文件(https://github.com/opencv/opencv/tree/2.4.13.2/modules/features2d/src)
问题在于,没有规则可以在src目录中包含* .i。
cc_library(
name = "features2d",
srcs = glob(["modules/features2d/src/**/*.cpp"]),
hdrs = glob([
"modules/features2d/src/**/*.hpp",
"modules/features2d/src/**/*.h",
"modules/features2d/include/**/*.hpp",
"modules/features2d/include/**/*.h"
]) + [
":module_includes",
],
includes = [
"modules/features2d/include",
],
visibility = ["//visibility:public"],
deps = [
":imgproc",
":flann",
],
)
这是错误原因所在:
@opencv2//:modules/features2d/src/generated_32.i' does not produce any cc_library srcs files (expected .cc, .cpp, .cxx, .c++, .C, .c, .h, .hh, .hpp, .hxx, .inc, .S, .s, .asm, .a, .lib, .pic.a, .lo, .pic.lo, .so, .dylib, .dll, .o or .pic.o).
如果有人知道如何完成此操作,那将非常有帮助。