Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent ebpfpub linking against the system zlib #7557

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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