Skip to content

Commit e4a1ab8

Browse files
authored
chore: update include packages in cmd and libs folders (#724)
1 parent 3e1745d commit e4a1ab8

8 files changed

Lines changed: 38 additions & 31 deletions

File tree

cmake/opentelemetry-proto.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ if(OPENTELEMETRY_INSTALL)
314314
endif()
315315

316316
if(TARGET protobuf::libprotobuf)
317-
target_link_libraries(opentelemetry_proto PUBLIC ${CONAN_LIBS_PROTOBUF})
317+
target_link_libraries(opentelemetry_proto PUBLIC protobuf::libprotobuf)
318318
else() # cmake 3.8 or lower
319319
target_include_directories(opentelemetry_proto
320320
PUBLIC ${Protobuf_INCLUDE_DIRS})

cmd/pktvisor-pcap/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
add_executable(pktvisor-pcap main.cpp)
22

3+
find_package(docopt REQUIRED)
4+
35
target_link_libraries(pktvisor-pcap
46
PRIVATE
5-
${CONAN_LIBS_DOCOPT.CPP}
7+
docopt::docopt
68
${VISOR_STATIC_PLUGINS}
79
)

cmd/pktvisor-reader/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
add_executable(pktvisor-reader main.cpp)
22

3+
find_package(docopt REQUIRED)
4+
35
target_link_libraries(pktvisor-reader
46
PRIVATE
5-
${CONAN_LIBS_DOCOPT.CPP}
7+
docopt::docopt
68
${VISOR_STATIC_PLUGINS}
79
)

cmd/pktvisord/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
add_executable(pktvisord main.cpp)
22

3+
find_package(docopt REQUIRED)
4+
35
if(NOT WIN32)
46
set(ADDITIONAL_LIBS resolv)
57
endif()
68

9+
if(NOT CRASHPAD_NOT_SUPPORTED)
10+
find_package(crashpad REQUIRED)
11+
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} crashpad::handler)
12+
endif()
713

814
target_link_libraries(pktvisord
915
PRIVATE
10-
${CONAN_LIBS_CRASHPAD}
1116
timer
1217
${ADDITIONAL_LIBS}
13-
${CONAN_LIBS_DOCOPT.CPP}
18+
docopt::docopt
1419
Visor::Core
1520
${VISOR_STATIC_PLUGINS}
1621
)

libs/visor_dns/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
message(STATUS "Visor Lib DNS Helper")
22

3+
find_package(pcapplusplus REQUIRED)
4+
find_package(Catch2 REQUIRED)
5+
36
add_library(VisorLibDns
47
dns.cpp
58
DnsLayer.cpp
@@ -16,12 +19,7 @@ target_include_directories(VisorLibDns
1619
target_link_libraries(VisorLibDns
1720
PUBLIC
1821
Visor::Lib::Tcp
19-
${CONAN_LIBS_PCAPPLUSPLUS}
20-
${CONAN_LIBS_PTHREADS4W}
21-
${CONAN_LIBS_LIBPCAP}
22-
${CONAN_LIBS_NPCAP}
23-
${CONAN_LIBS_SPDLOG}
24-
${CONAN_LIBS_FMT}
22+
pcapplusplus::pcapplusplus
2523
)
2624

2725
## TEST SUITE
@@ -32,7 +30,7 @@ add_executable(unit-tests-visor-dns
3230
target_link_libraries(unit-tests-visor-dns
3331
PRIVATE
3432
Visor::Lib::Dns
35-
${CONAN_LIBS_CATCH2})
33+
catch2::catch2_with_main)
3634

3735
add_test(NAME unit-tests-visor-dns
3836
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/visor_dns

libs/visor_tcp/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
message(STATUS "Visor Lib TCP Helper")
22

3-
add_library(VisorLibTcp
4-
VisorTcpLayer.cpp
5-
)
3+
find_package(pcapplusplus REQUIRED)
4+
5+
add_library(VisorLibTcp VisorTcpLayer.cpp)
6+
67
add_library(Visor::Lib::Tcp ALIAS VisorLibTcp)
78

89
target_include_directories(VisorLibTcp
@@ -12,8 +13,5 @@ target_include_directories(VisorLibTcp
1213

1314
target_link_libraries(VisorLibTcp
1415
PUBLIC
15-
${CONAN_LIBS_PCAPPLUSPLUS}
16-
${CONAN_LIBS_PTHREADS4W}
17-
${CONAN_LIBS_LIBPCAP}
18-
${CONAN_LIBS_NPCAP}
16+
pcapplusplus::pcapplusplus
1917
)

libs/visor_test/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
message(STATUS "Visor Lib Test Helper")
22

3+
find_package(spdlog REQUIRED)
4+
find_package(Catch2 REQUIRED)
5+
36
add_library(VisorLibTest INTERFACE)
47
add_library(Visor::Lib::Test ALIAS VisorLibTest)
58

@@ -9,8 +12,8 @@ target_include_directories(VisorLibTest
912

1013
target_link_libraries(VisorLibTest
1114
INTERFACE
12-
${CONAN_LIBS_SPDLOG}
13-
${CONAN_LIBS_CATCH2})
15+
spdlog::spdlog
16+
catch2::catch2_with_main)
1417

1518
target_compile_features(VisorLibTest INTERFACE cxx_std_17)
1619

libs/visor_utils/CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
message(STATUS "Visor Lib Utils")
22

3-
add_library(VisorLibUtils
4-
utils.cpp
5-
)
3+
find_package(pcapplusplus REQUIRED)
4+
find_package(fmt REQUIRED)
5+
find_package(Catch2 REQUIRED)
6+
7+
add_library(VisorLibUtils utils.cpp)
8+
69
add_library(Visor::Lib::Utils ALIAS VisorLibUtils)
710

811
target_include_directories(VisorLibUtils
@@ -12,12 +15,8 @@ target_include_directories(VisorLibUtils
1215

1316
target_link_libraries(VisorLibUtils
1417
PUBLIC
15-
${CONAN_LIBS_PCAPPLUSPLUS}
16-
${CONAN_LIBS_PTHREADS4W}
17-
${CONAN_LIBS_LIBPCAP}
18-
${CONAN_LIBS_NPCAP}
19-
${CONAN_LIBS_SPDLOG}
20-
${CONAN_LIBS_FMT}
18+
pcapplusplus::pcapplusplus
19+
fmt::fmt
2120
)
2221

2322
## TEST SUITE
@@ -26,7 +25,7 @@ add_executable(unit-tests-visor-utils test_utils.cpp)
2625
target_link_libraries(unit-tests-visor-utils
2726
PRIVATE
2827
Visor::Lib::Utils
29-
${CONAN_LIBS_CATCH2})
28+
catch2::catch2_with_main)
3029

3130
add_test(NAME unit-tests-visor-utils
3231
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs

0 commit comments

Comments
 (0)