Skip to content

chore: update include packages in cmd and libs folders #724

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

Merged
merged 1 commit into from
Aug 19, 2024
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
2 changes: 1 addition & 1 deletion cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ if(OPENTELEMETRY_INSTALL)
endif()

if(TARGET protobuf::libprotobuf)
target_link_libraries(opentelemetry_proto PUBLIC ${CONAN_LIBS_PROTOBUF})
target_link_libraries(opentelemetry_proto PUBLIC protobuf::libprotobuf)
else() # cmake 3.8 or lower
target_include_directories(opentelemetry_proto
PUBLIC ${Protobuf_INCLUDE_DIRS})
Expand Down
4 changes: 3 additions & 1 deletion cmd/pktvisor-pcap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_executable(pktvisor-pcap main.cpp)

find_package(docopt REQUIRED)

target_link_libraries(pktvisor-pcap
PRIVATE
${CONAN_LIBS_DOCOPT.CPP}
docopt::docopt
${VISOR_STATIC_PLUGINS}
)
4 changes: 3 additions & 1 deletion cmd/pktvisor-reader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_executable(pktvisor-reader main.cpp)

find_package(docopt REQUIRED)

target_link_libraries(pktvisor-reader
PRIVATE
${CONAN_LIBS_DOCOPT.CPP}
docopt::docopt
${VISOR_STATIC_PLUGINS}
)
9 changes: 7 additions & 2 deletions cmd/pktvisord/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
add_executable(pktvisord main.cpp)

find_package(docopt REQUIRED)

if(NOT WIN32)
set(ADDITIONAL_LIBS resolv)
endif()

if(NOT CRASHPAD_NOT_SUPPORTED)
find_package(crashpad REQUIRED)
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} crashpad::handler)
endif()

target_link_libraries(pktvisord
PRIVATE
${CONAN_LIBS_CRASHPAD}
timer
${ADDITIONAL_LIBS}
${CONAN_LIBS_DOCOPT.CPP}
docopt::docopt
Visor::Core
${VISOR_STATIC_PLUGINS}
)
Expand Down
12 changes: 5 additions & 7 deletions libs/visor_dns/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
message(STATUS "Visor Lib DNS Helper")

find_package(pcapplusplus REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibDns
dns.cpp
DnsLayer.cpp
Expand All @@ -16,12 +19,7 @@ target_include_directories(VisorLibDns
target_link_libraries(VisorLibDns
PUBLIC
Visor::Lib::Tcp
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_FMT}
pcapplusplus::pcapplusplus
)

## TEST SUITE
Expand All @@ -32,7 +30,7 @@ add_executable(unit-tests-visor-dns
target_link_libraries(unit-tests-visor-dns
PRIVATE
Visor::Lib::Dns
${CONAN_LIBS_CATCH2})
catch2::catch2_with_main)

add_test(NAME unit-tests-visor-dns
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/visor_dns
Expand Down
12 changes: 5 additions & 7 deletions libs/visor_tcp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
message(STATUS "Visor Lib TCP Helper")

add_library(VisorLibTcp
VisorTcpLayer.cpp
)
find_package(pcapplusplus REQUIRED)

add_library(VisorLibTcp VisorTcpLayer.cpp)

add_library(Visor::Lib::Tcp ALIAS VisorLibTcp)

target_include_directories(VisorLibTcp
Expand All @@ -12,8 +13,5 @@ target_include_directories(VisorLibTcp

target_link_libraries(VisorLibTcp
PUBLIC
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
pcapplusplus::pcapplusplus
)
7 changes: 5 additions & 2 deletions libs/visor_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
message(STATUS "Visor Lib Test Helper")

find_package(spdlog REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibTest INTERFACE)
add_library(Visor::Lib::Test ALIAS VisorLibTest)

Expand All @@ -9,8 +12,8 @@ target_include_directories(VisorLibTest

target_link_libraries(VisorLibTest
INTERFACE
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_CATCH2})
spdlog::spdlog
catch2::catch2_with_main)

target_compile_features(VisorLibTest INTERFACE cxx_std_17)

Expand Down
19 changes: 9 additions & 10 deletions libs/visor_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
message(STATUS "Visor Lib Utils")

add_library(VisorLibUtils
utils.cpp
)
find_package(pcapplusplus REQUIRED)
find_package(fmt REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibUtils utils.cpp)

add_library(Visor::Lib::Utils ALIAS VisorLibUtils)

target_include_directories(VisorLibUtils
Expand All @@ -12,12 +15,8 @@ target_include_directories(VisorLibUtils

target_link_libraries(VisorLibUtils
PUBLIC
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_FMT}
pcapplusplus::pcapplusplus
fmt::fmt
)

## TEST SUITE
Expand All @@ -26,7 +25,7 @@ add_executable(unit-tests-visor-utils test_utils.cpp)
target_link_libraries(unit-tests-visor-utils
PRIVATE
Visor::Lib::Utils
${CONAN_LIBS_CATCH2})
catch2::catch2_with_main)

add_test(NAME unit-tests-visor-utils
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs
Expand Down
Loading