Skip to content

Commit

Permalink
build: Fix shared library build.
Browse files Browse the repository at this point in the history
* driver/CMakeLists.txt (DRIVER_SOURCES): Add missing headers.
* userspace/libscap/engine/gvisor/CMakeLists.txt
[BUILD_SHARED_LIBS]: Add missing include directories.
* test/libscap/CMakeLists.txt (LIBSCAP_TESTS_LIBRARIES): Add
${PROTOBUF_LIB}.

Fixes: #1820
Signed-off-by: Maxim Cournoyer <[email protected]>
  • Loading branch information
Apteryks committed May 8, 2024
1 parent ff6510c commit 134843c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ set(DRIVER_SOURCES
ppm_consumer.h
capture_macro.h
socketcall_to_syscall.h
syscall_compat_loongarch64.h
syscall_compat_ppc64le.h
syscall_compat_riscv64.h
syscall_compat_s390x.h
syscall_compat_x86_64.h
syscall_ia32_64_map.c
)

Expand Down
1 change: 1 addition & 0 deletions test/libscap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set(LIBSCAP_TESTS_LIBRARIES
"${GTEST_LIB}"
"${GTEST_MAIN_LIB}"
"${CMAKE_THREAD_LIBS_INIT}"
"${PROTOBUF_LIB}"
scap
)

Expand Down
8 changes: 8 additions & 0 deletions userspace/libscap/engine/gvisor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ if (BUILD_SHARED_LIBS)
add_dependencies(scap_engine_gvisor_o uthash)
add_dependencies(scap scap_engine_gvisor_o)
target_sources(scap PRIVATE $<TARGET_OBJECTS:scap_engine_gvisor_o>)

target_include_directories(scap_engine_gvisor_o
PRIVATE
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/userspace
)
else()
add_library(scap_engine_gvisor
${scap_engine_gvisor_sources}
Expand Down

0 comments on commit 134843c

Please sign in to comment.