BUILD.bazel 678 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. cc_binary(
  2. name = "example",
  3. srcs = glob([
  4. "*.cc",
  5. ]),
  6. data = [
  7. "example.so",
  8. ],
  9. linkstatic = True,
  10. deps = [
  11. ":ray_api",
  12. ],
  13. )
  14. cc_binary(
  15. name = "example.so",
  16. srcs = glob([
  17. "*.cc",
  18. ]),
  19. linkopts = ["-shared"],
  20. linkstatic = True,
  21. deps = [
  22. ":ray_api",
  23. ],
  24. )
  25. cc_library(
  26. name = "ray_api",
  27. srcs = [
  28. "thirdparty/lib/libray_api.so",
  29. ],
  30. hdrs = glob([
  31. "thirdparty/include/**/*.h",
  32. "thirdparty/include/**/*.hpp",
  33. ]),
  34. linkopts = ["-Wl,-rpath,./"],
  35. strip_include_prefix = "thirdparty/include",
  36. visibility = ["//visibility:public"],
  37. )