Skip to content

Commit

Permalink
Prevent ebpfpub linking against the system zlib
Browse files Browse the repository at this point in the history
Update the ebpfpub version so that's possible to specify
to link against the osquery compiled zlib static library,
instead of linking against the system one.
  • Loading branch information
Smjert committed Apr 11, 2022
1 parent d81b8e4 commit dcb6323
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions libraries/cmake/source/ebpfpub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ function(ebpfpubLibraryMain)
unset(EBPF_COMMON_TOOLCHAIN_PATH CACHE)
endif()

get_target_property(zlib_library_folder thirdparty_zlib BINARY_DIR)
set(EBPF_COMMON_ZLIB_LIBRARY_PATH "${zlib_library_folder}/libthirdparty_zlib.a")

add_subdirectory("src" EXCLUDE_FROM_ALL)

target_link_libraries(ebpfpub PRIVATE thirdparty_cxx_settings)
add_library(thirdparty_ebpfpub ALIAS ebpfpub)

# Ensure zlib is built before ebpfpub
add_dependencies(ebpfpub thirdparty_zlib)
endfunction()

ebpfpubLibraryMain()
2 changes: 1 addition & 1 deletion libraries/cmake/source/ebpfpub/src

0 comments on commit dcb6323

Please sign in to comment.