NetdataEBPFCORE.cmake 900 B

123456789101112131415161718192021222324252627
  1. # Handling for eBPF CO-RE files
  2. #
  3. # Copyright (c) 2024 Netdata Inc.
  4. # SPDX-License-Identifier: GPL-3.0-or-later
  5. include(ExternalProject)
  6. set(ebpf-co-re_SOURCE_DIR "${CMAKE_BINARY_DIR}/ebpf-co-re")
  7. # Fetch and install our eBPF CO-RE files
  8. function(netdata_fetch_ebpf_co_re)
  9. ExternalProject_Add(
  10. ebpf-co-re
  11. URL https://github.com/netdata/ebpf-co-re/releases/download/v1.5.0/netdata-ebpf-co-re-glibc-v1.5.0.tar.xz
  12. URL_HASH SHA256=9585a5a48853f70efa51c48f57df34b4e47b1af56eaaef731f57525ebd76b90c
  13. SOURCE_DIR "${ebpf-co-re_SOURCE_DIR}"
  14. CONFIGURE_COMMAND ""
  15. BUILD_COMMAND ""
  16. INSTALL_COMMAND ""
  17. EXCLUDE_FROM_ALL 1
  18. )
  19. endfunction()
  20. function(netdata_add_ebpf_co_re_to_target _target)
  21. add_dependencies(${_target} ebpf-co-re)
  22. target_include_directories(${_target} BEFORE PRIVATE "${ebpf-co-re_SOURCE_DIR}")
  23. endfunction()